Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-49995

nmstate: state:down not allowed due to automatic DHCP.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • 4.18
    • 4.13.z, 4.12.z, 4.14.z, 4.15.z, 4.17.z, 4.16.z
    • None
    • Moderate
    • None
    • 3
    • OSDOCS Sprint 266
    • 1
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      We cannot not use state:down with OCP or we will get automatic DHCP configuration.

       

      - name: eno3
        type: interface
        state: down
        ipv4:
          enabled: false
        ipv6:
          enabled: false
       

      Fixes RHEL-78155

      We need to modify modules/virt-example-nmstate-IP-management.adoc around the section with.

      [source,yaml]
      ----
      # ...
          interfaces:
          - name: eth1
            description: No IP on eth1
            type: ethernet
            state: up
            ipv4:
              enabled: false
      # ...
      ----
      

      To add a note saying that state:down is not allowed and will not work. Use state:up with IPv4/6 enabled:false instead.

      Version-Release number of selected component (if applicable):

      4.16.x
          

      How reproducible:
      Always
      Steps to Reproduce:

          1. create a nmstate interface config
      - name: eno3
        type: interface
        state: down
        ipv4:
          enabled: false
        ipv6:
          enabled: false
          2. reboot
          

      Actual results:

      You will get DHCP eno3

      Expected results:

      No IP on eno3

      Additional info:

      According to nmstate docs, the state:down sets NetworkManager autoconnect false

       - Treating state:down as autoconnect false. (b8532490)
      
      Feb 05 23:27:08 master-2 NetworkManager[2742]: <debug> [1738798028.4758] ++ connection.autoconnect    = FALSE
      Feb 05 23:27:08 master-2 NetworkManager[2742]: <debug> [1738798028.4758] ++ connection.id             = 'eno3'
      Feb 05 23:27:08 master-2 NetworkManager[2742]: <debug> [1738798028.4759] ++ connection.interface-name = 'eno3'
      

      On OCP this causes the default nm-inird-generator automatic DHCP profile to be activated instead, because that profile has autoconnect:true

      Feb 05 23:29:57 master-2 NetworkManager[1602]: <info>  [1738798197.8407] device (eno2): Activation: starting connection 'eno2' (47985c50-3026-5b7c-a140-fdc2f2b62653)
      Feb 05 23:29:57 master-2 NetworkManager[1602]: <info>  [1738798197.8409] device (eno3): Activation: starting connection 'Wired Connection' (0c549a54-83e6-46b9-8d80-245bd752abfb)
      
      
      
      
      

              dfitzmau@redhat.com Darragh Fitzmaurice
              rbrattai@redhat.com Ross Brattain
              Ross Brattain Ross Brattain
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: