Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2136749

Summary: [RFE] NetworkManager should check sysctl options everytime (on reboot and on restart/reload as well) and report appropriate warning/error in log
Product: Red Hat Enterprise Linux 9 Reporter: Petr Barta <pbarta>
Component: NetworkManagerAssignee: Lubomir Rintel <lrintel>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: medium    
Version: 9.0CC: bgalvani, lrintel, rkhan, sfaye, sukulkar, till
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-22 12:40:58 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 Petr Barta 2022-10-21 07:44:29 UTC
Description of problem:

When system is configured with IPv6 option in NetworkManager config, but systemcl options disable ipv6, the behavior is inconsistent, and the logs are confusing.

The setup is as follows:
1) sysctl.conf contains following options:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.bond1.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.enp11s0.disable_ipv6 = 1
net.ipv6.conf.enp1s0.disable_ipv6 = 1
net.ipv6.conf.enp7s0.disable_ipv6 = 1
net.ipv6.conf.enp8s0.disable_ipv6 = 1
net.ipv6.conf.enp9s0.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

2) Specific interface has following config options:
# grep IPV6 /etc/sysconfig/network-scripts/ifcfg-<interface>
IPV6_DISABLED=no
IPV6INIT=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6ADDR=<IPv6 address>
IPV6_DEFAULTGW=<IPVv6 default GW's address>
IPV6_AUTOCONF=no

# nmcli con show id <itnerface> | grep -i ipv6
ipv6.method:                            manual
ipv6.dns:                               --
ipv6.dns-search:                        --
ipv6.dns-options:                       --
ipv6.dns-priority:                      0
ipv6.addresses:                         <IPv6 address>
ipv6.gateway:                           <IPv6 default GW's address>
ipv6.routes:                            --
ipv6.route-metric:                      -1
ipv6.route-table:                       0 (unspec)
ipv6.routing-rules:                     --
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.required-timeout:                  -1 (default)
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.addr-gen-mode:                     eui64
ipv6.ra-timeout:                        0 (default)
ipv6.dhcp-duid:                         --
ipv6.dhcp-iaid:                         --
ipv6.dhcp-timeout:                      0 (default)
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --
ipv6.dhcp-hostname-flags:               0x0 (none)
ipv6.token:                             --

3) After reboot, the interface does not have IPv6 address and reports DAD failure with "permission denied", but after restart of NetworkManager later, the IPv6 is assigned.

Version-Release number of selected component (if applicable):

RHEL 8.6
NetworkManager 1.36.0-7.el8_6.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Configure systemctl.conf and network interface with the above mentioned conflicting setup
2. Reboot the machine
3.Check that IPv6 is not assigned and DAD failures are reported in log
 (Log of following form:
  NetworkManager[PID]: <warn>  [timestamp] platform-linux: do-add-ip6-address[6:LL-IPv6 address]: failure 13 (Permission denied)
 )
4. Restart  NetworkManager
5 Check that the IPv6 address is assigned on the interface, and no more failures are reported in the log.

Actual results:

After reboot, the IPv6 is not assigned, and warning errors are reported.
After restart of NetowrkManager, the IPv6 is assigned, and warnings are not logged anymore.

Expected results:

- Behavior of the NetworkManager is consistent after reboot and restart/reload (either the IPv6 is assigned on reboot, or no IPv6 is assigned after reload).
- The log should report inconsistency of setting in sysctl.conf (IPv6 is disabled by those options) and interface configuration (interface config required IPv6 to be enabled and configured).

Additional info:

Comment 5 Lubomir Rintel 2023-03-22 12:40:58 UTC
This doesn't look like a NM bug. This wasn't that NM couldn't deal with sysctls specified in sysctl.conf, it was something that turned on disable_ipv6 amidst connection activation.
Not much we can do if something actively interferes and it's hard to guess what it was. It wasn't systemd-sysctl.service.

On my el8 installation I managed to reproduce a similar issue. Turns out it was tuned who was fiddling with the knobs it shouldn't be reported this upstream: https://github.com/redhat-performance/tuned/pull/518

I've volleyed a patch upstream and am closing this, because there's not much we should do on el8. My tuned patch doesn't look like a good fit for el8 and the remedy seems easy: just don't det disable_ipv6 if you wish to use IPv6.