lxc fails to start on boot but succeeds with a manual boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Saucy |
Fix Released
|
High
|
Unassigned |
Bug Description
=======
SRU Justification
1. Impact: containers are autostarted with bad (duplicate) configuration, and/or may fail
2. Devel fix: don't load the original configuration if a custom configuration file is specified
3. Stable fix: same as devel fix
4. Test case:
sudo lxc-create -t ubuntu -n xxx
echo "lxc.network.name = eth0" | sudo tee -a /var/lib/
cp /var/lib/
sudo lxc-start -n xxx -f /tmp/config
This will fail without the fix.
5. Regression potential: there should be no regressions, as we simply avoid loading the container's stock configuration file if an alternate configuration file is specified.
=======
root@cps2-
lxc-instance (os-api-cps2) start/running, process 2880
root@cps2-
lxc-start: failed to rename veth3ITMNG->eth0 : File exists
lxc-start: failed to setup netdev
lxc-start: failed to setup the network for 'os-api-cps2'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'os-api-cps2'
root@cps2-
ifdown: interface veth3ITMNG not configured
root@cps2-
# Template used to create this container: ubuntu
# Template script checksum (SHA-1): 6f468a9a658112f
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br18
lxc.network.name = eth0
lxc.network.hwaddr = 00:16:3e:00:02:68
lxc.network.ipv6 = **********
lxc.network.mtu = 9000
lxc.rootfs = /var/lib/
lxc.mount = /var/lib/
lxc.pivotdir = lxc_putold
lxc.devttydir = lxc
lxc.tty = 4
lxc.pts = 1024
lxc.utsname = os-api-cps2
lxc.arch = amd64
lxc.cap.drop = sys_module mac_admin mac_override
# When using LXC with apparmor, uncomment the next line to run unconfined:
#lxc.aa_profile = unconfined
lxc.cgroup.
# Allow any mknod (but not using the node)
lxc.cgroup.
lxc.cgroup.
# /dev/null and zero
lxc.cgroup.
lxc.cgroup.
# consoles
lxc.cgroup.
lxc.cgroup.
#lxc.cgroup.
#lxc.cgroup.
# /dev/{,u}random
lxc.cgroup.
lxc.cgroup.
lxc.cgroup.
lxc.cgroup.
# rtc
lxc.cgroup.
#fuse
lxc.cgroup.
#tun
lxc.cgroup.
#full
lxc.cgroup.
#hpet
lxc.cgroup.
#kvm
lxc.cgroup.
Running "service lxc restart" results in the same errors.
Running "lxc-start -d -n os-api-cps2" from the command line successfully starts the instance.
root@cps2-
ii liblxc0 1.0.0~alpha1-
ii lxc 1.0.0~alpha1-
ii lxc-templates 1.0.0~alpha1-
ii lxctl 0.3.1+debian-3 all Utility to manage LXC
ii python3-lxc 1.0.0~alpha1-
Related branches
description: | updated |
Thanks for reporting this bug. It appears to be a bug in the handling
of the -f argument by lxc-instance.conf
status: triaged
importance: high