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 1744427 - [RHEL 8.1] A host with invalid hostname can't activate its network interface by NetworkManager
Summary: [RHEL 8.1] A host with invalid hostname can't activate its network interface ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Beniamino Galvani
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-22 07:28 UTC by Beni Pelled
Modified: 2020-04-28 16:54 UTC (History)
10 users (show)

Fixed In Version: NetworkManager-1.22.0-0.2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:53:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1847 0 None None None 2020-04-28 16:53:59 UTC

Description Beni Pelled 2019-08-22 07:28:22 UTC
Description of problem:
A host with invalid hostname can't activate its network interface by NetworkManager
(I'm not sure if it's a bug or a new implementation for NetworkManager)

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


How reproducible:
100%

Steps to Reproduce:
1. Install RHEL-8.1 with valid hostname (ex. bpelled)
2. Make sure you can reload network interface and stay connected by 'nmcli con down <ifname> && nmcli con up <ifname>'
3. Change hostname to invalid name by 'hostnamectl set-hostname bpelled_invalid_hostname'
4. Try to reload the network interface by 'nmcli con down <ifname> && nmcli con up <ifname>'


Actual results:
An attempt to reload the interface after renaming the hostname will fail with 'Error: Connection activation failed: dhcp client failed to start'

The following info/warn will be in 'journalctl -xe NM_DEVICE=<ifname>':

Aug 22 09:45:02 bpelled_invalid_hostname NetworkManager[5698]: <info>  [1566456302.7398] device (ens3): Activation: starting connection 'ens3' (7a2a3a9b-f268-4571-8903-69db66a8e99b)
Aug 22 09:45:02 bpelled_invalid_hostname NetworkManager[5698]: <info>  [1566456302.7399] device (ens3): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Aug 22 09:45:02 bpelled_invalid_hostname NetworkManager[5698]: <info>  [1566456302.7404] device (ens3): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Aug 22 09:45:02 bpelled_invalid_hostname NetworkManager[5698]: <info>  [1566456302.7856] device (ens3): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Aug 22 09:45:02 bpelled_invalid_hostname NetworkManager[5698]: <info>  [1566456302.7859] dhcp4 (ens3): activation: beginning transaction (timeout in 45 seconds)
Aug 22 09:45:02 bpelled_invalid_hostname NetworkManager[5698]: <warn>  [1566456302.7860] device (ens3): failure to start DHCP: failed to set DHCP hostname: Invalid argument
Aug 22 09:45:02 bpelled_invalid_hostname NetworkManager[5698]: <info>  [1566456302.7860] device (ens3): state change: ip-config -> failed (reason 'dhcp-start-failed', sys-iface-state: 'managed')
Aug 22 09:45:02 bpelled_invalid_hostname NetworkManager[5698]: <warn>  [1566456302.7869] device (ens3): Activation: failed for connection 'ens3'
Aug 22 09:45:02 bpelled_invalid_hostname NetworkManager[5698]: <info>  [1566456302.7871] device (ens3): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')

Expected results:
Active Network interface.

Additional info:
Following [1] I tried to set hostname-mode=none on /etc/NetworkManager/NetworkManager.conf but I didn't manage to get it works.

[1] https://manpages.debian.org/unstable/network-manager/NetworkManager.conf.5.en.html

Comment 1 Beniamino Galvani 2019-10-17 16:09:20 UTC
Merge request:

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/310

Comment 4 Vladimir Benes 2019-12-12 14:18:41 UTC
covered by gen_activate_with_incorrect_hostname

Comment 6 errata-xmlrpc 2020-04-28 16:53:06 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, 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/RHBA-2020:1847


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