autostart on boot not working

Bug #1548731 reported by Florian Engelmann
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Description: Ubuntu 14.04.4 LTS
Release: 14.04

lxc:
  Installed: 1.0.8-0ubuntu0.3
  Candidate: 1.0.8-0ubuntu0.3

Upstart service /etc/init/lxc.conf should start all LXC containers having set "lxc.start.auto = 1" if /etc/default/lxc got LXC_AUTO="true".

This does not work on a "reboot"/"shutdown -r now" but it does work after a reboot using "restart lxc".

It fails because of missing network devices (early boot up stage):

lxc-start: conf.c: instantiate_veth: 3105 failed to attach 'vethMCUSEO' to the bridge 'lxcfr258': No such device
lxc-start: conf.c: lxc_create_network: 3388 failed to create netdev
lxc-start: start.c: lxc_spawn: 856 failed to create the network
lxc-start: start.c: __lxc_start: 1121 failed to spawn 'xxxxxxxxxx'
lxc-start: lxc_start.c: main: 341 The container failed to start.
lxc-start: lxc_start.c: main: 345 Additional information can be obtained by setting the --logfile and --logpriority options.

We do use a special veth setup but the lxc upstart service should still cover this case.

--- /etc/init/lxc.conf 2015-11-18 20:08:53.000000000 +0100
+++ /tmp/lxc.conf 2016-02-23 11:30:08.704830042 +0100
@@ -1,7 +1,7 @@
 description "lxc"
 author "Serge Hallyn <email address hidden>"

-start on runlevel [2345]
+start on started networking
 stop on starting rc RUNLEVEL=[016]

 env LXC_AUTO="false"

Revision history for this message
Florian Engelmann (engelmann) wrote :

any news?

Revision history for this message
Stéphane Graber (stgraber) wrote :

This is fixed in modern versions of LXC using systemd.

Changed in lxc (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.