project-new using lxc fails in artful due to symbol lookup error

Bug #1730506 reported by Sheila Miguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mojo: Continuous Delivery for Juju
Invalid
Undecided
Unassigned

Bug Description

Attempts to create a new project fail, but calling lxc-create command directly works.

This fails

» mojo project-new django18
2017-11-03 14:05:33 [INFO] Checking django18 project path at /srv/mojo/django18 ... 2017-11-03 14:05:33 [INFO] Checking django18 project container at /var/lib/lxc/django18.xenial/config ... 2017-11-03 14:05:33 [INFO] Not found, creating container 2017-11-03 14:05:33 [INFO] Creating LXC container 'django18.xenial'
2017-11-03 14:05:33 [INFO] Running command: lxc-create -t ubuntu-cloud -n django18.xenial -B dir --dir /srv/mojo/django18/xenial/ROOTFS -- -
-release xenial --arch amd64
lxc-create: symbol lookup error: lxc-create: undefined symbol: is_valid_bdev_type

This works

» sudo lxc-create -t ubuntu-cloud -n django18.xenial -B dir --dir /home/codersquid/testlxc/xenial -- --release xenial --arch amd64
ubuntu-cloudimg-query is /usr/bin/ubuntu-cloudimg-query
wget is /usr/bin/wget
Extracting container rootfs
Parallel unsquashfs: Using 4 processors
28597 inodes (31401 blocks) to write

created 24124 files
created 2893 directories
created 4387 symlinks
created 79 devices
created 0 fifos
/var/lib/dpkg/info/tzdata.postinst: 32: /var/lib/dpkg/info/tzdata.postinst: cannot create /dev/null: Permission denied

Current default time zone: 'Etc/UTC'
Local time is now: Mon Nov 6 21:11:30 UTC 2017.
Universal Time is now: Mon Nov 6 21:11:30 UTC 2017.

Container django18.xenial created.

Versions of liblxc1 and lxc1

» dpkg -s lxc1
Package: lxc1
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 1756
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Source: lxc
Version: 2.1.0-0ubuntu1
Replaces: lxc (<< 2.0.0~rc2-0ubuntu1~)
Depends: adduser, bridge-utils, dnsmasq-base, iptables, liblxc1 (= 2.1.0-0ubuntu1), python3, python3-lxc (= 2.1.0-0ubuntu1), init-system-helpers (>= 1.18~), libc6 (>= 2.17)
Recommends: libpam-cgfs, lxc-templates (= 2.1.0-0ubuntu1)
Suggests: btrfs-tools, lvm2, lxctl
Breaks: lxc (<< 2.0.0~rc2-0ubuntu1~)
Conffiles:
 /etc/default/lxc 8fe199d37e378013ae4d384af7929ab7
 /etc/dnsmasq.d-available/lxc 83f1a92da46692412ba16a5d883fa050
 /etc/lxc/default.conf 15aa0a8d3c151e054fdf74d12e4447a4
Description: Linux Containers userspace tools
 Containers are insulated areas inside a system, which have their own namespace
 for filesystem, network, PID, IPC, CPU and memory allocation and which can be
 created using the Control Group and Namespace features included in the Linux
 kernel.
 .
 This package provides the lxc-* tools, which can be used to start a single
 daemon in a container, or to boot an entire "containerized" system, and to
 manage and debug your containers.
Homepage: https://linuxcontainers.org

» dpkg -s liblxc1
Package: liblxc1
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 766
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Source: lxc
Version: 2.1.0-0ubuntu1
Replaces: liblxc0, lxc (<< 0.9.0~alpha3-0ubuntu1~)
Provides: liblxc0
Depends: cgroup-lite | systemd, lxc-common (= 2.1.0-0ubuntu1), rsync, libapparmor1 (>= 2.6~devel), libc6 (>= 2.17), libcap2 (>= 1:2.10), libgnutls30 (>= 3.5.0), libseccomp2 (>= 1.0.1), libselinux1 (>= 1.32)
Recommends: lxcfs, uidmap
Breaks: lxc (<< 0.9.0~alpha3-0ubuntu1~)
Conflicts: liblxc0
Description: Linux Containers userspace tools (library)
 Containers are insulated areas inside a system, which have their own namespace
 for filesystem, network, PID, IPC, CPU and memory allocation and which can be
 created using the Control Group and Namespace features included in the Linux
 kernel.
 .
 This package contains the libraries.
Homepage: https://linuxcontainers.org

Version of mojo snap
mojo 0.4.5 3 kuhlman classic

Revision history for this message
Sheila Miguez (codersquid) wrote :

I'm wondering if the snap has pulled in a conflicting version somehow, but I don't know snaps well enough to say.

https://bazaar.launchpad.net/~mojo-maintainers/mojo/trunk/view/head:/snap/snapcraft.yaml#L48

It's got lxc-templates there

Revision history for this message
Sheila Miguez (codersquid) wrote :

I've built this snap locally and will continue to investigate. So far,

» sudo snap install mojo_0.4.5+448_amd64.snap --classic --dangerous

codersquid@slowbird ~/work/mojo/trunk
» mojo project-new django18
2017-11-06 15:55:27 [WARNING] Removing $JUJU_REPOSITORY from the environment.
2017-11-06 15:55:27 [ERROR] This sub-command, project-new, must be run as root
codersquid@slowbird ~/work/mojo/trunk

» sudo mojo project-new django18
This should not be run as root, exiting.
Possibly use --break_everything option if you are really sure!

Revision history for this message
Sheila Miguez (codersquid) wrote :

I'm closing this due to finding this in the src while investigating.

in call_project_new

237 raise Unprivileged("Only LXD containers are supported with a snap install.")

For some reason this error didn't appear to me, so that should get fixed. It could be good to put in the docs as well.

Changed in mojo:
status: New → Invalid
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.