Bug 2189247 - Reapply on disabled ipv6 will cause auto ipv4 lose DNS nameserver [NEEDINFO]
Summary: Reapply on disabled ipv6 will cause auto ipv4 lose DNS nameserver
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: NetworkManager
Version: 9.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Wen Liang
QA Contact: Matej Berezny
URL:
Whiteboard:
Depends On:
Blocks: 2219847
TreeView+ depends on / blocked
 
Reported: 2023-04-24 14:07 UTC by Gris Ge
Modified: 2023-07-18 07:34 UTC (History)
10 users (show)

Fixed In Version: NetworkManager-1.43.5-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2219847 (view as bug list)
Environment:
Last Closed: 2023-05-10 08:30:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:
fge: needinfo? (bnemec)


Attachments (Terms of Use)
NetworkManager trace log (184.51 KB, text/plain)
2023-04-24 14:07 UTC, Gris Ge
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-496 0 None None None 2023-04-24 14:09:37 UTC
Red Hat Issue Tracker RHELPLAN-155550 0 None None None 2023-04-24 14:09:42 UTC
freedesktop.org Gitlab NetworkManager NetworkManager-ci merge_requests 1423 0 None merged dns: check IPv4 DNS after reapplying on disabled IPv6 2023-05-29 08:36:07 UTC

Description Gris Ge 2023-04-24 14:07:35 UTC
Created attachment 1959547 [details]
NetworkManager trace log

Description of problem:

Given a NIC with both ipv4 and ipv6 enabled with auto method, only DHCPv4 provided nameserver.

When reapply with ipv6 disabled.

Then noticed DNS nameserver been purged.

Version-Release number of selected component (if applicable):
NetworkManager-1.42.2-1.el9

How reproducible:
100%

Steps to Reproduce:
1. Please reach out to QE in https://issues.redhat.com/browse/OCPBUGS-11827 for a cluster.
2.
3.

Actual results:

DNS nameserver been purged after `oc apply` which then lead to rollback.

Expected results:

DNS nameserver retrieved from DHCPv4 unchanged.

Additional info:

Comment 6 Thomas Haller 2023-05-11 08:22:47 UTC
Wen, I headerd, you were able to reproduce this issue?

Could you explain in detail how to reproduce it. Or attach a reproducer script. Or write a NM-ci test (choose whatever approach you want).


Also, to my understanding you identified 

  https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/0a02995175e06e62924705393121a1c5efc3822d

as the fix?


In that case, it is fixed in upstream 1.43.5+, 1.42.6+, 1.40.18+.
It is also fixed in rhel-9.3 package NetworkManager-1.43.5-1.el9.
As of now, it is not yet fixed in latest rhel-9.2, or latest rhel-8.

Comment 9 Wen Liang 2023-05-14 15:38:01 UTC
(In reply to Thomas Haller from comment #6)
> Wen, I headerd, you were able to reproduce this issue?
> 
> Could you explain in detail how to reproduce it. Or attach a reproducer
> script. Or write a NM-ci test (choose whatever approach you want).
> 
> 
> Also, to my understanding you identified 
> 
>  
> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/
> 0a02995175e06e62924705393121a1c5efc3822d
> 
> as the fix?
> 
> 
> In that case, it is fixed in upstream 1.43.5+, 1.42.6+, 1.40.18+.
> It is also fixed in rhel-9.3 package NetworkManager-1.43.5-1.el9.
> As of now, it is not yet fixed in latest rhel-9.2, or latest rhel-8.


I discussed this bug with bgalvani, the upstream nm-1-40 and nm-1-42 branches already had that commit and there was no customer request for backporting into rhel-9.2/rhel-8.8. 

About the steps to reproduce the bug:

1. I used the nm-in-container.sh script and added the eth1 interface
2. nmcli connection add type ethernet ifname eth1 con-name eth1+ ipv6.method manual ipv6.addresses $someaddr ipv6.dns $somedns
3. nmcli connection up eth1+ 
4. nmcli | grep -A10 "DNS configuration:"  (In this case, you should be able to see some IPv4 and IPv6 DNS)
5. nmcli connection modify eth1+ -ipv6.addresses $someaddr -ipv6.dns $somedns ipv6.method disabled (Remove the IPv6 addresses and DNS, and set the Ipv6 method into disabled)
6. nmcli device reapply eth1+; nmcli | grep -A10 "DNS configuration:" (The expected behavior is that the IPv4 DNS is not removed, but if the bug persists, then the IPv4 DNS is removed)

Comment 12 Gris Ge 2023-05-22 03:48:04 UTC
Hi Wen,

Please prepare a scratch build of 9.2 for Ben Nemec to try out.

Comment 13 Wen Liang 2023-05-22 16:37:12 UTC
(In reply to Gris Ge from comment #12)
> Hi Wen,
> 
> Please prepare a scratch build of 9.2 for Ben Nemec to try out.

Sure, I will do it!


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