View Issue Details

IDProjectCategoryView StatusLast Update
0007435CentOS-7NetworkManagerpublic2015-08-19 15:49
ReporterDesintegr 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version7.0-1406 
Target VersionFixed in Version 
Summary0007435: NetworkManager automatically creates a non working eth0 profile each boot in LXC container
DescriptionHello.

I use CentOS 7 and trying to create a libvirt LXC CentOS 7 container.
I am able to create the CentOS 7 container and then boot into it fine.

(
commands used to create the container :
yum install --installroot=/var/lib/libvirt/lxc/test1 --releasever=7 systemd passwd NetworkManager
virt-install --connect lxc:/// --name test1 --ram 1024 --filesystem /var/lib/libvirt/lxc/test1/,/ --noautoconsole
define root password, edit securetty, etc.
)

At the first boot, NetworkManager creates automatically a new profile named 'eth0' :

NAME UUID TYPE DEVICE
eth0 0a5658c7-9732-4a99-b06d-0fbbb437f3bf 802-3-ethernet eth0

This profile has no IPV4 method activated and is not autoconnected :

$ nmcli con show eth0 | grep -E "autoconnect|ipv4.method"
connection.autoconnect: no
ipv4.method: disabled

I activate the connection (with nmtui) then get it up with 'nmcli con up eth0' :

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)

-bash-4.2# ip a s eth0
14: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3e:c4:70:24 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.9/24 brd 192.168.122.255 scope global dynamic eth0
       valid_lft 3589sec preferred_lft 3589sec
    inet6 fe80::216:3eff:fec4:7024/64 scope link
       valid_lft forever preferred_lft forever

Next boot, NetworkManager keeps my previous eth0 profile and creates a new one (assigned to device eth0) :

NAME UUID TYPE DEVICE
eth0 5c72289f-e759-451f-9d48-790f1095f922 802-3-ethernet eth0
eth0 0a5658c7-9732-4a99-b06d-0fbbb437f3bf 802-3-ethernet --

This new profile is not configured and so I have no connection :

-bash-4.2# ip addr show eth0
8: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3e:c4:70:24 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::216:3eff:fec4:7024/64 scope link

I active the new profile.

Next boot, a new inactive profile is automatically created :

-bash-4.2# nmcli con
NAME UUID TYPE DEVICE
eth0 115de973-4798-4df3-9fd1-ae0f445f56ff 802-3-ethernet eth0
eth0 5c72289f-e759-451f-9d48-790f1095f922 802-3-ethernet --
eth0 0a5658c7-9732-4a99-b06d-0fbbb437f3bf 802-3-ethernet --

To clean old profiles and create a working one, I need to run each boot :

$ nmcli connection delete eth0
$ nmcli connection add type ethernet ifname eth0 con-name eth0

NetworkManager should not created automatically a new eth0 profile at boot.
My workaround is to not use NetworkManager in the LXC and use the ifcfg method.

This problem was reported on CentOS forums by 2 other people :
https://www.centos.org/forums/viewtopic.php?f=47&t=47350

A similar problem (not in LXC) was reported on Debian bug tracker :
(network-manager: keeps creating and using new connection "eth0" that does not work)
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755202
TagsNo tags attached.
abrt_hash
URL

Activities

Desintegr

Desintegr

2014-07-30 07:33

reporter   ~0020547

Hi.

I reported this bug upstream :
https://bugzilla.redhat.com/show_bug.cgi?id=1124721
toracat

toracat

2014-08-01 10:14

manager   ~0020568

Thanks for submitting the bug upstream. Please keep up posted as the BZ is not open to the public.
Desintegr

Desintegr

2015-08-19 15:30

reporter   ~0023959

Hi.

The upstream bug is closed as NOTABUG :
"Closing this. It was not a NetworkManager bug and no longer happens after a libvirt rebase: bug #1194593" (RedHat Bugzilla).

I think you can close this bug too.
toracat

toracat

2015-08-19 15:49

manager   ~0023960

Thanks for reporting back with the note from the upstream BZ. Now closing as 'resolved'.

Issue History

Date Modified Username Field Change
2014-07-28 09:07 Desintegr New Issue
2014-07-30 07:33 Desintegr Note Added: 0020547
2014-08-01 10:14 toracat Note Added: 0020568
2015-08-19 15:30 Desintegr Note Added: 0023959
2015-08-19 15:49 toracat Note Added: 0023960
2015-08-19 15:49 toracat Status new => resolved
2015-08-19 15:49 toracat Resolution open => fixed