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

nmstate doesn't rollback dns options in OCP

XMLWordPrintable

    • Important
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      - nmstate doesn't rollback dns options from nncp.
      - search and server's values are rollbacked successfully, but options are not
      deleted.
      - Red Hat supports nmstate operator to config dns setting at Day2 instead of setting with nmcli in RHCOS directly.
      - The function is unreliable, making it difficult for users to apply settings.

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

      - Test version is "nmstate operator 4.14-202410241808"

      How reproducible:

      - Apply a nncp with dns options and roll-back dns options from the nncp

      Steps to Reproduce:

      1. Apply NodeNetworkConfigurationPolicy to set dns-resolver with dns options
      ~~~
      apiVersion: nmstate.io/v1
      kind: NodeNetworkConfigurationPolicy
      metadata:
       name: worker-0-dns-testing
      spec:
        nodeSelector:
          kubernetes.io/hostname: <target_node>
        desiredState:
          dns-resolver:
            config:
              search:
              - example.com
              - example.org
              server:
              - 2001:db8:f::1
              - 192.0.2.251
              options:               // set options
              - timeout:2
              - attempts:3
      ~~~
      $oc debug node[node]
      $chroot /host
      $cat /etc/resolv.confsearch example.com example.org
      nameserver 2001:db8:f::1
      nameserver 192.0.2.251
      options timeout:2 attempts:3      // option are applied
      
      2.  delete options in NodeNetworkConfigurationPolicy
      ~~~
      apiVersion: nmstate.io/v1
      kind: NodeNetworkConfigurationPolicy
      metadata:
       name: worker-0-dns-testing
      spec:
        nodeSelector:
          kubernetes.io/hostname: <target_node>
        desiredState:
          dns-resolver:
            config:
              search:
              - example.com
              - example.org
              server:
              - 2001:db8:f::1
              - 192.0.2.251
      ~~~     
      $oc debug node[node]
      $chroot /host
      $cat /etc/resolv.conf
      search example.com example.org
      nameserver 2001:db8:f::1
      nameserver 192.0.2.251
      options timeout:2 attempts:3     // theses options are not deleted.
      
      search and server's values are rollbacked successfully, but options are not.     

      Actual results:

      options still remain
      $cat /etc/resolv.conf
      search example.com example.org 
      nameserver 2001:db8:f::1 
      nameserver 192.0.2.251 
      options timeout:2 attempts:3     // theses options are not deleted.    

      Expected results:

      options are deleted from /etc/resolv.conf
      $cat /etc/resolv.conf
      search example.com example.org 
      nameserver 2001:db8:f::1 
      nameserver 192.0.2.251 

      Additional info:

      Support for DNS options was added in nmstate.
      https://access.redhat.com/solutions/7048779

              bnemec@redhat.com Benjamin Nemec
              rhn-support-hyoskim Sophia Hyosun Kim
              Qiong Wang Qiong Wang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: