I'm running wily LXC on wily (or now xenial) pretty much every day, so
this isn't very straightforward to reproduce. lxc's own autopkgtests
also do that, and they run in the cloud in a wily instance, pretty
similar to your's.

I tried a wily cloud image, created an LXC container, and started it,
which works as expected:

  nova boot --flavor m1.small --image 
ubuntu/ubuntu-wily-daily-amd64-server-20151026-disk1.img test1
  ssh [... into test1 instance ]
  sudo lxc-create -n w1 -t download -- -d ubuntu -r wily -a amd64
  sudo lxc-start -n w1 -F

Thanks for the strace; there's nothing unusual in it, so the reason why
it thinks it fails must be somewhere else.

But either way: You can set "ExecStart=/bin/false" in systemd-update-
utmp-runlevel.service to force the unit to fail, but that's in no way
fatal to the container; it boots, and you just have this one failed
unit. Nothing else depends on this, this will just make "runlevel" spit
out an updated value, so that legacy software becomes a bit more
compatible. So while that unit certainly should not fail (this is a
bug), this is almost surely *not* the reason what breaks you, so this is
far from 'critical'.

I had a look at your user-data: this dance around a temporary systemd
unit to shut down the machine is rather complex. You can just have a
runcmd like

 - (while [ ! -e /var/lib/cloud/instance/boot-finished ]; do sleep 1;
done; shutdown -P now) &

It also looks wrong: your runcmd *immediately* starts the unit, which
(tries to) shutdown the container while cloud-init is still running. My
hunch is that calling "shutdown" at this point will hang or fail as
there is still the boot transaction running, so this smells like a
deadlock which would explain why cloud-init never finishes.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1509747

Title:
  Intermittent lxc failures on wily

To manage notifications about this bug go to:
https://bugs.launchpad.net/juju-core/+bug/1509747/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to