[Bug 1290920] [NEW] fails to start container with local provider with non-default LXC path
Martin Pitt
martin.pitt at ubuntu.com
Tue Mar 11 15:54:28 UTC 2014
Public bug reported:
I tried to use the local provider according to
https://juju.ubuntu.com/docs/config-local.html, in particular
https://juju.ubuntu.com/docs/config-LXC.html . James Page already
informed me that the documentation is outdated for trusty, and one needs
to drop the "sudo" from "juju bootstrap". With that, bootstrapping fails
due to not being able to start the container, when using a non-default
LXC path (I can't use /var/lib/lxc, my root partition is too small).
I initially experienced that on my normal trusty workstation, but I
reproduced in a current and pristine trusty cloud-image VM (I just ran
"run-adt-test -sUl" from lp:auto-package-testing).
$ sudo apt-get install juju-local
Now set up LXC for a different container path:
$ sudo mkdir /srv/lxc
$ echo "lxc.lxcpath = /srv/lxc" | sudo tee /etc/lxc/lxc.conf
Note that this works just fine with all the LXC tools.
$ juju generate-config
Now create a different juju root:
$ sudo mkdir /srv/juju; sudo chown ubuntu:ubuntu /srv/juju
$ sed -i '/root-dir/ { s/# //; s_:.*$_: /srv/juju_ }' .juju/environments.yaml
$ juju switch local
$ juju bootstrap
Logging to /home/ubuntu/.juju/local/log/cloud-init-output.log on remote host
Starting MongoDB server (juju-db-ubuntu-local)
Bootstrapping Juju machine agent
Starting Juju machine agent (juju-agent-ubuntu-local)
So far so good:
$ juju status
environment: local
machines:
"0":
agent-state: started
agent-version: 1.17.4.1
dns-name: localhost
instance-id: localhost
series: trusty
services: {}
There are no actual containers running (sudo lxc-ls --fancy), but that's
the same as with using the default /var/lib/lxc/.
$ juju deploy mysql
Added charm "cs:precise/mysql-36" to the environment.
After a while I see:
$ juju status
environment: local
machines:
"0":
agent-state: started
agent-version: 1.17.4.1
dns-name: localhost
instance-id: localhost
series: trusty
"1":
agent-state-info: '(error: error executing "lxc-start": command get_cgroup failed
to receive response)'
instance-id: pending
series: precise
services:
mysql:
charm: cs:precise/mysql-36
exposed: false
relations:
cluster:
- mysql
units:
mysql/0:
agent-state: pending
machine: "1"
In .juju/local/log/machine-0.log I see:
2014-03-11 15:48:49 WARNING juju.worker.instanceupdater updater.go:231 cannot get instance info for instance "": no instances found
2014-03-11 15:49:16 ERROR juju.container.lxc lxc.go:134 container failed to start: error executing "lxc-start": command get_cgroup failed to receive response
2014-03-11 15:49:16 ERROR juju.provisioner provisioner_task.go:403 cannot start instance for machine "1": error executing "lxc-start": command get_cgroup failed to receive response
(Attaching the whole file)
Other than that, .juju/local/log/ contains a broken symlink "all-
machines.log -> /var/log/juju-ubuntu-local/all-machines.log" and "cloud-
init-output.log" without any error messages.
Note that this works with the default /var/lib/lxc/ path.
** Affects: juju (Ubuntu)
Importance: Undecided
Status: New
** Attachment added: ".juju/local/log/machine-0.log"
https://bugs.launchpad.net/bugs/1290920/+attachment/4018339/+files/machine-0.log
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to juju in Ubuntu.
https://bugs.launchpad.net/bugs/1290920
Title:
fails to start container with local provider with non-default LXC path
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/juju/+bug/1290920/+subscriptions
More information about the Ubuntu-server-bugs
mailing list