Bug 1907049

Summary: NetworkManager no longer sets hostname
Product: Red Hat Enterprise Linux 8 Reporter: Shantanu Goel <sgoel01>
Component: NetworkManagerAssignee: NetworkManager Development Team <nm-team>
Status: CLOSED DUPLICATE QA Contact: Desktop QE <desktop-qa-list>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: acardace, atragler, bgalvani, bstinson, carl, fge, jwboyer, lrintel, rkhan, sukulkar, thaller, till
Target Milestone: rcKeywords: Regression, Triaged
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-22 14:37:30 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 Shantanu Goel 2020-12-12 14:23:00 UTC
Description of problem:
I just upgraded my machine to CentOS 8 Stream and NetworkManager no longer sets the hostname like it used to. No modifications have been made to the configuration after the upgrade. There is a primary interface (eno1) which uses DHCP for IP / DNS / default gateway and a secondary one which has a statically assigned IP address without a DNS entry.

Prior to the upgrade I would see the following messages in the system logs:

Aug 29 09:00:42 localhost.localdomain NetworkManager[3240]: <info> [1598706042.1537] NetworkManager (version 1.22.8-4.el8) is starting... (for the first time)
...
Aug 29 09:00:46 localhost.localdomain NetworkManager[3240]: <info> [1598706046.3192] policy: set 'eno1' (eno1) as default for IPv4 routing and DNS
Aug 29 09:00:46 localhost.localdomain NetworkManager[3240]: <info> [1598706046.3201] device (eno1): Activation: successful, device activated.
Aug 29 09:00:46 localhost.localdomain NetworkManager[3240]: <info> [1598706046.3205] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 29 09:00:46 localhost.localdomain NetworkManager[3240]: <info> [1598706046.3256] policy: set-hostname: set hostname to 'broadwell.fios-router.home' (from address lookup)
Aug 29 09:00:48 broadwell.fios-router.home NetworkManager[3240]: <info> [1598706048.6677] manager: startup complete

Since the upgrade this is what it prints:
Dec 11 20:04:31 localhost.localdomain NetworkManager[3220]: <info> [1607735071.2966] NetworkManager (version 1.30.0-0.3.el8) is starting... (for the first time)
...
Dec 11 20:04:35 localhost.localdomain NetworkManager[3220]: <info> [1607735075.4877] policy: set 'eno1' (eno1) as default for IPv4 routing and DNS
Dec 11 20:04:35 localhost.localdomain NetworkManager[3220]: <info> [1607735075.4887] device (eno1): Activation: successful, device activated.
Dec 11 20:04:35 localhost.localdomain NetworkManager[3220]: <info> [1607735075.4891] manager: NetworkManager state is now CONNECTED_GLOBAL
Dec 11 20:04:37 localhost.localdomain NetworkManager[3220]: <info> [1607735077.8180] manager: startup complete

Notice the missing "policy: set-hostname ..." messages with version 1.30

Version-Release number of selected component (if applicable):
NetworkManager-1.30.0-0.3.el8.x86_64

How reproducible:
Consistently

Steps to Reproduce:
1.
2.
3.

Actual results:
hostname is set to localhost.localdomain

Expected results:
hostname should be set via reverse DNS lookup like it prior to the upgrade

Additional info:

Comment 1 Gris Ge 2021-03-24 04:46:18 UTC
Hi Thomas,

Could investigate this regression issue?

Comment 2 Till Maas 2021-06-10 12:29:23 UTC
Possible duplicate: https://bugzilla.redhat.com/show_bug.cgi?id=1970335

Comment 3 Till Maas 2021-06-22 14:37:30 UTC

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