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.
Description of problem:
On an Red Hat Enterprise Linux CoreOS release 4.5 node. With a pre-existing hostname "master-0.ostest.test.metalkube.org", when Keepalived configures a Virtual IP to an interface, it triggers a "set hostname" operation which does an address lookup and changes the hostname to the DNS record that matches the VIP, i.e., "ns1.ostest.test.metalkube.org". Being that Keepalived addresses are correctly marked as deprecated:
3: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 fd2e:6f44:5dd8:c956::5/128 scope global nodad deprecated noprefixroute
valid_lft forever preferred_lft 0sec
inet6 fd2e:6f44:5dd8:c956::2/128 scope global nodad deprecated noprefixroute
valid_lft forever preferred_lft 0sec
inet6 fd2e:6f44:5dd8:c956::14/128 scope global dynamic noprefixroute
valid_lft 3121sec preferred_lft 3121sec
I find that this behavior is incorrect due to substituting the already configured non "localhost" hostname of a live address in the same interface with a new lookup for an address that is deprecated and not meant to be used for much else than receiving traffic.
Version-Release number of selected component (if applicable):
NetworkManager-1.20.0-5.el8_1.x86_64
Steps to Reproduce:
1. Set up Keepalived to configure VIPs on the same subnet and iface that gets configured by DHCPv6
2. Wait for the VIPs to get configured
3. sudo journalctl -b | cut -f 3,4 -d' ' | uniq -f 1
Actual results:
begin at
17:19:12 localhost
17:19:21 master-0.ostest.test.metalkube.org
17:26:33 ns1.ostest.test.metalkube.org
17:48:15 master-0.ostest.test.metalkube.org
[core@master-0 ~]$
Expected results:
begin at
17:19:12 localhost
17:19:21 master-0.ostest.test.metalkube.org
[core@master-0 ~]$
Additional info:
This happened on a https://github.com/openshift-metal3/dev-scripts deployment
Comment 1Beniamino Galvani
2020-04-07 16:22:17 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.
Comment 8Beniamino Galvani
2021-07-23 08:48:21 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 (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
Description of problem: On an Red Hat Enterprise Linux CoreOS release 4.5 node. With a pre-existing hostname "master-0.ostest.test.metalkube.org", when Keepalived configures a Virtual IP to an interface, it triggers a "set hostname" operation which does an address lookup and changes the hostname to the DNS record that matches the VIP, i.e., "ns1.ostest.test.metalkube.org". Being that Keepalived addresses are correctly marked as deprecated: 3: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000 inet6 fd2e:6f44:5dd8:c956::5/128 scope global nodad deprecated noprefixroute valid_lft forever preferred_lft 0sec inet6 fd2e:6f44:5dd8:c956::2/128 scope global nodad deprecated noprefixroute valid_lft forever preferred_lft 0sec inet6 fd2e:6f44:5dd8:c956::14/128 scope global dynamic noprefixroute valid_lft 3121sec preferred_lft 3121sec I find that this behavior is incorrect due to substituting the already configured non "localhost" hostname of a live address in the same interface with a new lookup for an address that is deprecated and not meant to be used for much else than receiving traffic. Version-Release number of selected component (if applicable): NetworkManager-1.20.0-5.el8_1.x86_64 Steps to Reproduce: 1. Set up Keepalived to configure VIPs on the same subnet and iface that gets configured by DHCPv6 2. Wait for the VIPs to get configured 3. sudo journalctl -b | cut -f 3,4 -d' ' | uniq -f 1 Actual results: begin at 17:19:12 localhost 17:19:21 master-0.ostest.test.metalkube.org 17:26:33 ns1.ostest.test.metalkube.org 17:48:15 master-0.ostest.test.metalkube.org [core@master-0 ~]$ Expected results: begin at 17:19:12 localhost 17:19:21 master-0.ostest.test.metalkube.org [core@master-0 ~]$ Additional info: This happened on a https://github.com/openshift-metal3/dev-scripts deployment