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 1478453 - NetworkManager changes FQDN rhv host to 'localhost.localdomain'
Summary: NetworkManager changes FQDN rhv host to 'localhost.localdomain'
Keywords:
Status: CLOSED DUPLICATE of bug 1419906
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Francesco Giudici
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1475943
TreeView+ depends on / blocked
 
Reported: 2017-08-04 15:06 UTC by Bill Sanford
Modified: 2017-08-16 13:32 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-16 13:32:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The messages file on the rhv-m host (406.80 KB, text/plain)
2017-08-04 15:06 UTC, Bill Sanford
no flags Details

Description Bill Sanford 2017-08-04 15:06:25 UTC
Created attachment 1309101 [details]
The messages file on the rhv-m host

Description of problem:
Installing RHEL 7.4 for RHV host results in NetworkManager changing the FQDN to 'localhost.localdomain'

Version-Release number of selected component (if applicable):
RHEL-7.4-20170727.1
rhv-4.1.5-1

How reproducible:
100%

Steps to Reproduce:
1. 
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Francesco Giudici 2017-08-08 16:52:14 UTC
(In reply to Bill Sanford from comment #0)
> Created attachment 1309101 [details]
> The messages file on the rhv-m host
> 
> Description of problem:
> Installing RHEL 7.4 for RHV host results in NetworkManager changing the FQDN
> to 'localhost.localdomain'
>

As shown in the log, NetworkManager start and activates connection "enp30s0".
The IP address is taken from a dhcp server, but no hostname is provided in the offer.
When this happens, if no static hostname is provided, NetworkManager will try to do a reverse lookup on the ip received (if the connection provides also a default gateway). In this case it is exactly what happens: the hostname "corrin.spice.ml2.eng.bos.redhat.com" is retrieved by reverse lookup and
set as the transient hostname by NetworkManager.

Later, the "enp30s0" connection is deleted: NetworkManager will then kill the associated dhcp client and reset the transient hostname to the one it was before (was unset, so it is reset to localhost.localdomain).
A new connection "System enp30s0" is created on the same device but with "NM_CONTROLLED=no", so NetworkManager will no more take care of starting the dhcp nor to do the reverse lookup to update the hostname.

This is the expected NetworkManager behavior.

Note that also if NetworkManager would not reset the hostname, after the first reboot the hostname would be back to localhost, and no one would provide the update via reverse lookup.
The hostname retrieval via reverse lookup can be disabled by adding "hostname-mode=dhcp" in the NetworkManager configuration file.

I cannot see any flaw in NetworkManager behavior, I think this issue is already tracked in RHEV bug 1419906.
While waiting for it, a workaround would be to set a static hostname on the host. Once a static hostname is set it will not be updated by transient ones and will also survive reboot.

Comment 3 Francesco Giudici 2017-08-11 14:08:32 UTC
Hi Bill,
  I would advice to stay tuned on bug 1419906 and in the meanwhile assign a static hostname to your host to workaround the issue.
Please let me know if there is something you would like NetworkManager to do different or if you want for any reason keep this open maybe changing the component... otherwise I'm going to close this bug.
Thank you.

Comment 4 Bill Sanford 2017-08-16 13:32:32 UTC

*** This bug has been marked as a duplicate of bug 1419906 ***


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