interface name eth1 does not come back after lxc-stop
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: lxc
This bug-report is for lxc 0.6.5-1 on Ubuntu 10.04.2.
I (must) use lxc with physical interface configuration (eth1 in my
example).
Inside the container there is a Ubuntu 10.04.2, too.
I can start the container, connect to it, networking works, etc.
Everything looks ok. But when I stop the container and try to restart it,
eth1 is no more available and restarting fails. I must reboot the host to
have eth1 back.
root@zoo:/lxc# grep network ubuntu.cfg
lxc.network.type = phys
lxc.network.link = eth1
lxc.network.flags = up
lxc.network.name = eth0
lxc.network.mtu = 1500
lxc.network.ipv4 = 129.69.1.219/24
root@zoo:/lxc# ethtool eth1
Settings for eth1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Link partner advertised link modes: Not reported
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: No
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
root@zoo:/lxc# l /proc/sys/
dRWX - 2011-04-13 08:15 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:15 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
root@zoo:/lxc# lxc-start -d -f ubuntu.cfg -n ubuntu
root@zoo:/lxc# lxc-console -n ubuntu
Type <Ctrl+a q> to exit the console
root@ubuntu:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:56:8e:00:22
inet addr:129.69.1.219 Bcast:129.69.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:98 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:6675 (6.6 KB) TX bytes:1386 (1.3 KB)
root@zoo:/lxc# lxc-stop -n ubuntu
root@zoo:/lxc# lxc-start -f ubuntu.cfg -n ubuntu
lxc-start: failed to retrieve the index for eth1
lxc-start: failed to create netdev
lxc-start: failed to create the network
lxc-start: failed to spawn 'ubuntu'
lxc-start: No such file or directory - failed to remove cgroup '/cgroup/ubuntu'
root@zoo:/lxc# ethtool eth1
Settings for eth1:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available
root@zoo:/lxc# l /proc/sys/
dRWX - 2011-04-13 08:15 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:15 /proc/sys/
dRWX - 2011-04-13 08:20 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
dRWX - 2011-04-13 08:17 /proc/sys/
As you can see: eth1 is now dev3 and lxc does not rename it back. I cannot
restart the container without eth1, I have to reboot the host. This is a
complete show stopper for lxc and makes it useless.
Thanks for reporting this bug. Unfortunately, lxc is not supported on lucid, and no longer works with lucid's kernel at all.
What you are seeing is fixed in newer kernels. If you update to a backported natty or oneiric kernel, it should be fixed. If not, please do reply to this bug.