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 1Beniamino Galvani
2019-10-17 16:09:20 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