NetworkManager restart creates new in-memory connection
Issue
- NetworkManager restart creates new in-memory connection
- If an
/etc/sysconfig/network-scripts/ifcfg-
file has aDHCP_HOSTNAME
option set, or if a NetworkManager connection has thenmcli
propertyipv4.dhcp-hostname
set, aftersystemctl restart NetworkManager
, NetworkManager creates a new in-memory connection which has wrong parameters, which don't have ipv4.dhcp-hostname parameter set, so after DHCP lease expire DNS server lost DNS client record. - To reproduce:
[root@hostname ~]# nmcli con
NAME UUID TYPE DEVICE
eth0 288296e4-572c-4d89-b1f7-759fb5739536 802-3-ethernet eth0
[root@hostname ~]# nmcli con mod eth0 ipv4.dhcp-hostname `hostname`
[root@hostname ~]# nmcli con
NAME UUID TYPE DEVICE
eth0 288296e4-572c-4d89-b1f7-759fb5739536 802-3-ethernet eth0
[root@hostname ~]# systemctl restart NetworkManager
[root@hostname ~]# nmcli con
NAME UUID TYPE DEVICE
eth0 1e3249b6-9829-4791-a389-ae7ffff08cdf 802-3-ethernet eth0
eth0 288296e4-572c-4d89-b1f7-759fb5739536 802-3-ethernet --
[root@hostname ~]# nmcli con show 1e3249b6-9829-4791-a389-ae7ffff08cdf | grep -i dhcp-hostname
ipv4.dhcp-hostname: --
ipv6.dhcp-hostname: --
Environment
- Red Hat Enterprise Linux 7.2
NetworkManager-1.0.6-31.el7_2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.