Bug 2154737

Summary: failed to apply uncompressed ipv6 in dns
Product: Red Hat Enterprise Linux 9 Reporter: Mingyu Shi <mshi>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.2CC: ferferna, jiji, jishi, network-qe, sfaye, till
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nmstate-2.2.4-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:31:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mingyu Shi 2022-12-19 03:04:47 UTC
Description of problem:
If ipv6 in `dns-resolver` is not compressed, nmstate(rust) regards them as different with compressed format at verification.

Version-Release number of selected component (if applicable):
nmstate-2.2.2-2.el9.x86_64
NetworkManager-1.41.6-1.el9.x86_64
Linux kvm-04-guest30.hv2.lab.eng.bos.redhat.com 5.14.0-212.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Dec 13 17:09:01 EST 2022 x86_64 x86_64 x86_64 GNU/Linux
DISTRO=RHEL-9.2.0-20221215.0

How reproducible:
100%

Steps to Reproduce:
echo "
dns-resolver:
  config:
    server:
    - 3000:0000:0000:0000:0000:0000:0000:0000
    - 0000:0000:0000:0000:0000:0000:0000:0100
    - 0000:0000:000F:0000:0000:0000:0000:0100
    - 3001:db8::1:1:1:1:1
    - 3001:db8:0:0:0:0:2:1
    - 3001:db8::0:1
    - '3002:0:0:1:0:0:0:1'
    - 3003:dB8:0:0:1:0:0:1
    - 3004:db8::1:0:0:1
    - 3005:DB8:0:0:1::1
    - 0:0:0:0:0:FFFF:192.0.2.1
    - ::FFFF:192.0.2.2
    - 03:0000:000:00:0::4
routes:
  config:
  - destination: ::/0
    metric: 20550
    next-hop-address: 8::9
    next-hop-interface: veth0
    table-id: 250
interfaces:
- name: veth0
  type: veth
  state: up
  ipv6:
    enabled: true
    address:
    - ip: 8::8
      prefix-length: 64
  veth:
    peer: veth0_p
" | nmstatectl apply


Actual results:
NmstateError: VerificationError: Failed to apply DNS config: desire name servers ["3000:0000:0000:0000:0000:0000:0000:0000", "0000:0000:0000:0000:0000:0000:0000:0100", "0000:0000:000F:0000:0000:0000:0000:0100", "3001:db8::1:1:1:1:1", "3001:db8:0:0:0:0:2:1", "3001:db8::0:1", "3002:0:0:1:0:0:0:1", "3003:dB8:0:0:1:0:0:1", "3004:db8::1:0:0:1", "3005:DB8:0:0:1::1", "0:0:0:0:0:FFFF:192.0.2.1", "::FFFF:192.0.2.2", "03:0000:000:00:0::4"], got Some(["3000::", "::100", "0:0:f::100", "3001:db8:0:1:1:1:1:1", "3001:db8::2:1", "3001:db8::1", "3002:0:0:1::1", "3003:db8::1:0:0:1", "3004:db8::1:0:0:1", "3005:db8::1:0:0:1", "::ffff:192.0.2.1", "::ffff:192.0.2.2", "3::4"])

Expected results:
No failure, and compressed the IPv6 addressed automatically

Additional info:

Comment 1 Gris Ge 2023-01-12 04:39:30 UTC
Patch posted to upstream: https://github.com/nmstate/nmstate/pull/2190

Comment 6 errata-xmlrpc 2023-05-09 07:31:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nmstate bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2190