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

dns-resolver option doesn't apply with "Bug: Manager(UnknownDevice)" error

    • nmstate-2.2.15-2.el9
    • None
    • None
    • rhel-sst-network-management
    • ssg_networking
    • 1
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • Approved Blocker
    • Release Note Not Required
    • None

      The following nmstate configuration does not apply even though it's expected it should

      ```
      desiredState:
      dns-resolver:
      config:
      search:

      • test.com
        server:
      • fd2e:6f44:5dd8:c956::1
      • 2099::9999
        interfaces:
      • name: enp1s0
        type: ethernet
        state: up
        ipv4:
        auto-dns: false
        dhcp: false
        enabled: false
        ipv6:
        auto-dns: false
        dhcp: false
        enabled: false
        ```

      After removing the `dns-resolver` section we get a config that applies correctly, i.e.

      ```
      desiredState:
      interfaces:

      • name: enp1s0
        type: ethernet
        state: up
        ipv4:
        auto-dns: false
        dhcp: false
        enabled: false
        ipv6:
        auto-dns: false
        dhcp: false
        enabled: false
        ```

      The config with only dns-resolver also does not apply

      ```
      desiredState:
      dns-resolver:
      config:
      search:

      • test.com
        server:
      • fd2e:6f44:5dd8:c956::1
      • 2099::9999
        ```

      All this definitely points towards dns-resolver section as the one at fault. In all the scenarios when we fail, the error returned is

      ```
      nmstate::nm::query_apply::profile] Got activation failure Bug: Manager(UnknownDevice): No suitable device found for this connection (device [...] not available because profile is not compatible with device (mismatching interface name)).
      ```

      with interface name in the error message being not necessarily the one that we configure (because with only dns-resolver section we don't configure any interface explicitly).

      This is a regression because in the current form we have no way of using nmstate to configure DNS. Because of this, we do need a backport to RHEL 9.2 z-stream

      Acceptance criteria:
      Given a system administrator managing network configuration via nmstate and the system administrator has the nmstate configuration described above (See description), 
      When the system administrator applies the nmstate configuration, 
      Then the configuration should be applied without any errors and the `dns-resolver` section should be correctly processed and configured without causing any issues.

      Definition of Done

      • The implementation meets the acceptance criteria
      • The code is backported into RHEL-9.2.0.z via RHEL-1527

              fge@redhat.com Gris Ge
              mkowalsk@redhat.com Mat Kowalski
              Gris Ge Gris Ge
              Mingyu Shi Mingyu Shi
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: