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

Failed to clean DNS server when stored in the interface

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • None
    • None
    • 1
    • rhel-net-mgmt
    • ssg_networking
    • 2
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • NMT SST - Future releases
    • Hide

      Given a system administrator configuring DNS settings in a system,

      When they attempt to clear the DNS server settings stored in the interface by setting dns-resolver config to empty lists for search and server,

      Then NMState should successfully apply this change, resulting in the configured DNS servers being emptied as expected.

      Definition of Done:

      • The implementation meets the acceptance criteria
      • Unit test and integration test are written and pass
      • The code is part of a build attached to an errata
      Show
      Given a system administrator configuring DNS settings in a system, When they attempt to clear the DNS server settings stored in the interface by setting dns-resolver config to empty lists for search and server, Then NMState should successfully apply this change, resulting in the configured DNS servers being emptied as expected. Definition of Done: The implementation meets the acceptance criteria Unit test and integration test are written and pass The code is part of a build attached to an errata
    • None
    • None
    • Unspecified Release Note Type - Unknown
    • None

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

      Failed to clean DNS server when stored in the interface using

      dns-resolver:
        config:
          search: []
          server: []
      

      While removing only `search` works, removing with

      dns-resolver:
        config: {}
      

      works too
       

       

      Please provide the package NVR for which bug is seen:

      nmstate-2.2.20-1.el9.x86_64
      nispor-1.2.14-1.el9.x86_64
      NetworkManager-1.45.8-1.el9.x86_64

      How reproducible:

      100%

      Steps to reproduce

      echo '---
      dns-resolver:
        config:
          search:
          - veth0.lan
          - veth0.lan0
          server:
          - 114.114.114.114
          - 180.76.76.76
          - 8.8.8.8
          - 8.8.8.9
      routes:
        config:
        - destination: 0.0.0.0/0
          next-hop-address: 1.0.0.254
          next-hop-interface: veth0
          metric: 500
        - destination: ::/0
          next-hop-address: 100::254
          next-hop-interface: veth0
      interfaces:
      - name: veth0
        type: veth
        veth:
          peer: veth0_p
        state: up
        ipv4:
          address:
          - ip: 1.0.0.1
            prefix-length: 24
          enabled: true
        ipv6:
          address:
          - ip: 100::1
            prefix-length: 64
          enabled: true
      ' | nmstatectl apply
      
      echo '---
      dns-resolver:
        config:
          search: []
          server: []' | nmstatectl apply
      

      Expected results

      Configured DNS were empty

      Actual results

      [18:59:34@vm-10-0-186-193 yml]0# echo '---
      dns-resolver:
        config:
          search: []
          server: []' | nmstatectl apply
      [2023-12-18T10:59:40Z INFO  nmstate::query_apply::net_state] Created checkpoint /org/freedesktop/NetworkManager/Checkpoint/64
      [2023-12-18T10:59:40Z WARN  nmstate::nm::query_apply::dns] Storing DNS to NetworkManager via global dns API, this will cause __all__ interface level DNS settings been ignored
      [2023-12-18T10:59:40Z INFO  nmstate::query_apply::net_state] Retrying on: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      [2023-12-18T10:59:41Z INFO  nmstate::query_apply::net_state] Retrying on: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      [2023-12-18T10:59:42Z INFO  nmstate::query_apply::net_state] Retrying on: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      [2023-12-18T10:59:43Z INFO  nmstate::query_apply::net_state] Retrying on: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      [2023-12-18T10:59:44Z INFO  nmstate::query_apply::net_state] Retrying on: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      [2023-12-18T10:59:46Z WARN  nmstate::nm::query_apply::dns] Storing DNS to NetworkManager via global dns API, this will cause __all__ interface level DNS settings been ignored
      [2023-12-18T10:59:46Z INFO  nmstate::query_apply::net_state] Retrying on: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      [2023-12-18T10:59:47Z INFO  nmstate::query_apply::net_state] Retrying on: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      [2023-12-18T10:59:48Z INFO  nmstate::query_apply::net_state] Retrying on: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      [2023-12-18T10:59:49Z INFO  nmstate::query_apply::net_state] Retrying on: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      [2023-12-18T10:59:50Z INFO  nmstate::query_apply::net_state] Rollbacked to checkpoint /org/freedesktop/NetworkManager/Checkpoint/64
      NmstateError: VerificationError: Failed to apply DNS config: desire name servers '', got '114.114.114.114 180.76.76.76 8.8.8.8 8.8.8.9'
      

       

              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:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: