RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1911241 - better deal with ipv6 address in dns config
Summary: better deal with ipv6 address in dns config
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.4
Assignee: Fernando F. Mancera
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-28 10:42 UTC by Mingyu Shi
Modified: 2022-05-10 13:53 UTC (History)
6 users (show)

Fixed In Version: nmstate-1.1.1-0.1.alpha1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 13:34:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 1693 0 None None None 2021-08-09 16:17:41 UTC
Red Hat Product Errata RHEA-2022:1772 0 None None None 2022-05-10 13:35:02 UTC

Description Mingyu Shi 2020-12-28 10:42:28 UTC
Description of problem:
Similar with #bz1760800 , when ipv6 dns is written in, for example, full format, nmstate can't deal with it.

Version-Release number of selected component (if applicable):
nmstate-1.0.0-1.el8.noarch
nispor-1.0.1-2.el8.x86_64
NetworkManager-1.30.0-0.5.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
echo "---
dns-resolver:
  config:
    search:
    - veth0.lan
    - veth0.lan0
    server:
    - 10.68.5.26
    - 10.72.17.5
    - 8.8.8.8
    - 0000:0000:0000:0000:0000:0000:0000:0100
routes:
  config:
  - destination: 0.0.0.0/0
    next-hop-address: 1.0.0.254
    next-hop-interface: veth0
  - destination: ::/0
    next-hop-address: 100::254
    next-hop-interface: veth0
interfaces:
- name: veth0
  type: ethernet
  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 set

Actual results:
Failed

Expected results:
No failure and convert expanded ipv6 address to compressed address.

Additional info:
Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==1.0.0', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 70, in main
    return args.func(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 269, in apply
    args.save_to_disk,
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 309, in apply_state
    save_to_disk=save_to_disk,
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 71, in apply
    _apply_ifaces_state(plugins, net_state, verify_change, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 115, in _apply_ifaces_state
    _verify_change(plugins, net_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 120, in _verify_change
    net_state.verify(current_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/net_state.py", line 65, in verify
    self._dns.verify(current_state.get(DNS.KEY))
  File "/usr/lib/python3.6/site-packages/libnmstate/dns.py", line 195, in verify
    {DNS.KEY: cur_dns.config},
libnmstate.error.NmstateVerificationError: 
desired
=======
---
dns-resolver:
  search:
  - veth0.lan
  - veth0.lan0
  server:
  - 10.68.5.26
  - 10.72.17.5
  - 8.8.8.8
  - 0000:0000:0000:0000:0000:0000:0000:0100

current
=======
---
dns-resolver:
  search:
  - veth0.lan
  - veth0.lan0
  server:
  - 10.68.5.26
  - 10.72.17.5
  - 8.8.8.8
  - ::100

difference
==========
--- desired
+++ current
@@ -7,4 +7,4 @@
   - 10.68.5.26
   - 10.72.17.5
   - 8.8.8.8
-  - 0000:0000:0000:0000:0000:0000:0000:0100
+  - ::100

Comment 3 Fernando F. Mancera 2021-08-09 16:17:42 UTC
Upstream patch: https://github.com/nmstate/nmstate/pull/1693

Comment 7 Gris Ge 2021-09-22 07:56:29 UTC
Tested using nmstate-1.0 branch and nmstate-1.1 branch using yaml


```
---
dns-resolver:
  config:
    search: []
    server:
    - "0000:0000:0000:0000:0000:0000:0000:0100"
    - 8.8.4.4
interfaces:
  - name: eth1
    type: ethernet
    state: up
    ipv4:
      address:
      - ip: 192.0.2.251
        prefix-length: 24
      dhcp: false
      enabled: true
    ipv6:
      address:
      - ip: 2001:db8:1::1
        prefix-length: 64
      dhcp: false
      enabled: true
      autoconf: false
routes:
  config:
  - destination: 0.0.0.0/0
    next-hop-address: 192.0.2.1
    next-hop-interface: eth1
  - destination: ::/0
    next-hop-address: 2001:db8:1::3
    next-hop-interface: eth1
```

Comment 8 Mingyu Shi 2021-10-11 10:29:38 UTC
Verified with versions:
nmstate-1.1.1-0.1.alpha1.el8.noarch
nispor-1.1.1-1.el8.x86_64
NetworkManager-1.34.0-0.2.el8.x86_64

1. DNS with static ipv6:
[18:25:53@hpe-dl380pgen8-02-vm-9 ~]0# nmstatectl set dns6_static.yaml
/tmp/nmstatelog/2021-10-11-18:25:57-859112499.log
Desired state applied: 
---
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: ethernet
  state: up
  ipv6:
    enabled: true
    address:
    - ip: 8::8
      prefix-length: 64
/tmp/nmstatelog/2021-10-11-18:25:57-859112499.0.log nmstatectl set dns6_static.yaml return 0
[18:26:00@hpe-dl380pgen8-02-vm-9 ~]0# nmstatectl show | yq3 r - dns-resolver
config:
  search: []
  server:
    - '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
running:
  search:
    - hpe2.lab.eng.bos.redhat.com
  server:
    - '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
    - 10.19.42.41
    - 10.11.5.19
    - 10.5.30.160
[18:26:21@hpe-dl380pgen8-02-vm-9 ~]0# cat /etc/resolv.conf 
# Generated by NetworkManager
search hpe2.lab.eng.bos.redhat.com
nameserver 3000::
nameserver ::100
nameserver 0:0:f::100
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 3001:db8:0:1:1:1:1:1
nameserver 3001:db8::2:1
nameserver 3001:db8::1
nameserver 3002:0:0:1::1
nameserver 3003:db8::1:0:0:1
nameserver 3004:db8::1:0:0:1
nameserver 3005:db8::1:0:0:1
nameserver 192.0.2.1
nameserver 192.0.2.2
nameserver 3::4
nameserver 10.19.42.41
nameserver 10.11.5.19
nameserver 10.5.30.160


2. DNS with DHCPv6(auto-dns=false):
[18:16:24@hpe-dl380pgen8-02-vm-9 ~]0# nmstatectl set dns6.yaml 
/tmp/nmstatelog/2021-10-11-18:16:29-569349971.log
Desired state applied: 
---
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
interfaces:
- name: veth0
  type: ethernet
  state: up
  ipv6:
    enabled: true
    auto-dns: false
    dhcp: true
/tmp/nmstatelog/2021-10-11-18:16:29-569349971.0.log nmstatectl set dns6.yaml return 0
[18:16:49@hpe-dl380pgen8-02-vm-9 ~]1# nmstatectl show | yq3 r - dns-resolver
config:
  search: []
  server:
    - '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
running:
  search:
    - hpe2.lab.eng.bos.redhat.com
  server:
    - 10.19.42.41
    - 10.11.5.19
    - 10.5.30.160

Comment 10 errata-xmlrpc 2022-05-10 13:34:46 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/RHEA-2022:1772


Note You need to log in before you can comment on or make changes to this bug.