Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-54558

Changing route in kernel mode got netlink unknown error: code -22

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.5
    • nmstate
    • No
    • Moderate
    • rhel-sst-network-management
    • ssg_networking
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Hide

      Given a system administrator has stopped NetworkManager and applied configurations in the description,

      When they apply a third configuration file to modify the routes,

      Then, the routes must update as specified in without triggering a netlink error (code -22) and the updated routes should be visible in the routing table.

      Definition of Done:

      • The implementation meets the acceptance criteria
      • Integration tests are written and pass
      • The code is part of a downstream build attached to an errata
      Show
      Given a system administrator has stopped NetworkManager and applied configurations in the description, When they apply a third configuration file to modify the routes, Then, the routes must update as specified in without triggering a netlink error (code -22) and the updated routes should be visible in the routing table. Definition of Done: The implementation meets the acceptance criteria Integration tests are written and pass The code is part of a downstream build attached to an errata
    • None
    • None
    • None

      What were you trying to do that didn't work?

      After some state changing in kernel mode, failed to change route.

      Please provide the package NVR for which bug is seen:

      nmstate-2.2.33-1.el9.x86_64

      How reproducible:

      100%

      Steps to reproduce

      systemctl stop NetworkManager
      ip link add eth1 type veth peer eth1_p
      
      cat << EOF > 1.yaml
      dns-resolver:
        config:
          server:
          - 2001:4860:4860::8888
          - 2001:4860:4860::8844
          - 8.8.4.4
          - 8.8.8.8
          search:
          - example.com
          - example.org
      route-rules: {}
      routes:
        config:
        - destination: ::/0
          next-hop-interface: eth1
          next-hop-address: 2001:db8:1::3
          table-id: 200
        - destination: 0.0.0.0/0
          next-hop-interface: eth1
          next-hop-address: 192.0.2.1
          table-id: 200
      interfaces:
      - name: eth1
        type: ethernet
        state: up
        ipv4:
          enabled: true
          dhcp: false
          address:
          - ip: 192.0.2.251
            prefix-length: 24
        ipv6:
          enabled: true
          dhcp: false
          autoconf: false
          address:
          - ip: 2001:db8:1::1
            prefix-length: 64
      EOF
      
      cat << EOF > 2.yaml
      dns-resolver:
        config:
          search:
          - example.org
          server:
          - 2001:4860:4860::8888
          - 8.8.4.4
          - 2001:4860:4860::8855
          - 8.8.8.9
      interfaces:
      - name: eth1
        type: ethernet
        state: up
        ipv4:
          dhcp: false
          address:
          - ip: 192.0.2.252
            prefix-length: 24
        ipv6:
          dhcp: false
          autoconf: false
          address:
          - ip: 2001:db8:1::2
            prefix-length: 64
      EOF
      
      cat << EOF > 3.yaml
      ---
      dns-resolver: 
        config: 
          search: 
          - example.com
          - example.org
          server:
          - 2001:4860:4860::8888
          - 8.8.4.4
          - 2001:4860:4860::8855
          - 8.8.8.9
      interfaces: 
        - name: eth1
          type: ethernet
          state: up
          ipv4:
            address: 
            - ip: 192.0.2.253
              prefix-length: 24
            dhcp: false
            enabled: true
          ipv6:
            address: 
            - ip: 2001:db8:1::3
              prefix-length: 64
            dhcp: false
            enabled: true
            autoconf: false
      routes: 
        config: 
        - destination: 0.0.0.0/0
          next-hop-address: 192.0.2.2
          next-hop-interface: eth1
          table-id: 200
        - destination: ::/0
          next-hop-address: 2001:db8:1::2
          next-hop-interface: eth1
          table-id: 200
      EOF
      
      nmstatectl apply 1.yaml
      nmstatectl apply 2.yaml
      nmstatectl apply 3.yaml # <------- failed here
      

      Expected results

      example.com added to dns search, ip changed, routes added

      Actual results

      NmstateError: PluginFailure: Unknown error from nipsor plugin: NisporBug, Got netlink unknown error: code -22, msg: Invalid argument (os error 22)

       

      The key in step 3 is to change route, if route is not modified, everything is good.

              rh-ee-sfaye Stanislas Faye
              rh-ee-mshi1 Mingyu Shi
              Network Management Team Network Management Team
              Mingyu Shi Mingyu Shi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: