Bug 1820770
Summary: | Keepalived assignment of a deprecated IPv6 Virtual IP triggers "set hostname" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Ben Nemec <bnemec> |
Component: | NetworkManager | Assignee: | Beniamino Galvani <bgalvani> |
Status: | CLOSED ERRATA | QA Contact: | Matej Berezny <mberezny> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.1 | CC: | acardace, asegurap, atragler, bgalvani, bperkins, fge, imelofer, lrintel, mberezny, rkhan, sukulkar, thaller, till, vbenes |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | 8.1 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | NetworkManager-1.32.2-1.el8 | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-11-09 19:28:54 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: |
Description
Ben Nemec
2020-04-03 20:24:40 UTC
Hi, NetworkManager doesn't update the kernel hostname when there is already a static hostname configured on the machine. The static hostname is what is set in /etc/hostname and is visible with: $ hostnamectl Static hostname: fedora If somebody else sets the hostname only in kernel (using the equivalent of 'hostname foo'), it is setting the *transient* hostname. NM doesn't honor an already configured transient hostname because it assumes to be only the entity managing it. It would be racy to let NM and other tools manage the transient hostname at the same time. So, from this point of view, I think NM is doing the right thing. Talking about the deprecated address issue, NM simply takes the first address configured without considering the deprecation. Probably it should consider it; this would be easy to fix. In your case, if we modify NM to take the first non deprecated address (fd2e:6f44:5dd8:c956::14/128), would it get the right hostname (master-0.ostest.test.metalkube.org) via reverse lookup? To avoid the reverse lookup you could also set 'hostname-mode=dhcp' or even 'hostname-mode=none' in the [main] section of a new configuration file /etc/NetworkManager/conf.d/. See 'man NetworkManager.conf' for an explanation of the setting. Oops, I missed your response. Thanks for the update. Some comments inline. (In reply to Beniamino Galvani from comment #1) > In your case, if we modify NM to take the first non deprecated address > (fd2e:6f44:5dd8:c956::14/128), would it get the right hostname > (master-0.ostest.test.metalkube.org) via reverse lookup? Yes, that's the behavior we want. > > To avoid the reverse lookup you could also set 'hostname-mode=dhcp' or > even 'hostname-mode=none' in the [main] section of a new configuration > file /etc/NetworkManager/conf.d/. See 'man NetworkManager.conf' for > an explanation of the setting. I'm not sure we can do that. We have users who are not sending the hostname via DHCP and need to do the reverse lookup in order to get the hostname set at all. We have a workaround for the DHCP case, but anyone relying on the reverse DNS is likely broken. Created attachment 1804797 [details]
Reproducer
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 (Moderate: NetworkManager security, 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/RHSA-2021:4361 *** Bug 2052098 has been marked as a duplicate of this bug. *** |