quickstart fails, hardcodes /var/lib/lxc/ somewhere

Bug #1329049 reported by Martin Pitt on 2014-06-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-quickstart (Ubuntu)
Jorge Niedbalski

Bug Description

I am on current Utopic, and installed the utopic-proposed juju packages (as 1.18.1 is known to not work on utopic):

ii juju-core 1.18.4-0ubuntu1 amd64 Juju is devops distilled - client
ii juju-local 1.18.4-0ubuntu1 all dependency package for the Juju local provider
ii juju-mongodb 2.4.10-0ubuntu1 amd64 MongoDB object/document-oriented database for Juju
ii juju-quickstart 1.3.1-0ubuntu1 all Easy configuration of Juju environments
ii python-jujuclient 0.17.5-0ubuntu2 all Python API client for juju

With no pre-existing ~/.juju, quickstart fails with:

$ juju quickstart
changes to the environments file have been saved
juju quickstart v1.3.1
bootstrapping the local environment (type: local)
sudo privileges will be required to bootstrap the environment
retrieving the environment status
retrieving the Juju API address
connecting to wss://
requesting juju-gui deployment
charm URL: cs:precise/juju-gui-90
juju-gui deployment request accepted
exposing service juju-gui
requesting new unit deployment
juju-gui/0 deployment request accepted
juju-gui/0 deployment is pending
machine 1 provisioning is pending
juju-quickstart: error: machine 1 is in an error state: error: open /var/lib/lxc/martin-local-machine-1/config: no such file or directory
ERROR exit status 1

$ juju status
environment: local
    agent-state: started
    dns-name: localhost
    instance-id: localhost
    series: utopic
    agent-state-info: '(error: open /var/lib/lxc/martin-local-machine-1/config: no
      such file or directory)'
    instance-id: pending
    series: precise
    charm: cs:precise/juju-gui-90
    exposed: true
        agent-state: pending
        machine: "1"

I have changed the LXC path, as my /var/lib/ is too small for many containers:

$ cat /etc/lxc/lxc.conf
lxc.lxcpath = /scratch/lxc

So I suppose juju-quickstart (or perhaps juju itself) hardcodes /var/lib/lxc/ somewhere, instead of asking LXC:

$ sudo lxc-config lxc.lxcpath

(Ideally it wouldn't care about these files in the first place and only use the lxc-* tools to interact with containers, as the structure of this dir should be an internal implementation detail. But I realize that for some things this might not be possible)

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: juju-quickstart 1.3.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.15.0-5.10-generic 3.15.0-rc8
Uname: Linux 3.15.0-5-generic x86_64
ApportVersion: 2.14.3-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Jun 11 21:48:06 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-02-27 (104 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140224)
PackageArchitecture: all
SourcePackage: juju-quickstart
UpgradeStatus: No upgrade log present (probably fresh install)

Martin Pitt (pitti) wrote :
Martin Pitt (pitti) wrote :

It indeed created some stuff there, which LXC can't see:

$ sudo ls -l /var/lib/lxc/
drwxr-xr-x 3 root root 4096 Jun 11 21:45 juju-precise-template
drwxr-xr-x 3 root root 4096 Mär 11 11:04 martin-local-machine-1

I wiped /var/lib/lxc/ again and made a /var/lib/lxc → /scratch/lxc symlink, and with that it gets further. It still fails, but I'll file this as a separate bug.

Changed in juju-quickstart (Ubuntu):
assignee: nobody → Jorge Niedbalski (niedbalski)
Changed in juju-quickstart (Ubuntu):
status: New → In Progress
Jorge Niedbalski (niedbalski) wrote :


I proposed the fix https://code.launchpad.net/~niedbalski/golxc/fix-1329049/+merge/225584 for golxc, to use
the lxc-config lxc.lxpath value instead of /var/lib/lxc by default.

Once this fix is landed on golxc , i'll promote another PR for using this on juju-core.

Jorge Niedbalski (niedbalski) wrote :

OK, this has been merged into golxc/juju-core. Marking this as fix committed.

Changed in juju-quickstart (Ubuntu):
status: In Progress → Fix Committed
tags: added: cts
Changed in juju-quickstart (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers