NetworkManager restart creates new in-memory connection

Solution Unverified - Updated -

Issue

  • NetworkManager restart creates new in-memory connection
  • If an /etc/sysconfig/network-scripts/ifcfg- file has a DHCP_HOSTNAME option set, or if a NetworkManager connection has the nmcli property ipv4.dhcp-hostname set, after systemctl 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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In