Creating an LXC type container fails

Bug #1653973 reported by Christopher Townsend
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Libertine
Status tracked in Devel
Devel
Fix Released
High
Christopher Townsend
Trunk
Fix Released
High
Christopher Townsend
libertine (Ubuntu)
Fix Released
High
Christopher Townsend

Bug Description

After installing python3-libertine-lxd and creating and running an LXD type, trying to create a new LXC type container fails. This is the output:

LxcContainer.py:230: ERROR: create_libertine_container(): Failed to create container
LxcContainer.py:342: ERROR: _dump_lxc_log(): lxc 20170103133451.100 ERROR lxc_conf - conf.c:chown_mapped_root:3399 - No mapping for container root

LxcContainer.py:342: ERROR: _dump_lxc_log(): lxc 20170103133451.101 ERROR lxc_container - lxccontainer.c:do_bdev_create:1047 - Error chowning /home/townsend/.cache/libertine-container/test-lxc/rootfs to container root

LxcContainer.py:342: ERROR: _dump_lxc_log(): lxc 20170103133451.104 ERROR lxc_conf - conf.c:suggest_default_idmap:4502 - You do not have subuids or subgids allocated

LxcContainer.py:342: ERROR: _dump_lxc_log(): lxc 20170103133451.104 ERROR lxc_conf - conf.c:suggest_default_idmap:4503 - Unprivileged containers require subuids and subgids

LxcContainer.py:342: ERROR: _dump_lxc_log(): lxc 20170103133451.105 ERROR lxc_container - lxccontainer.c:do_lxcapi_create:1511 - Error creating backing store type (none) for test-lxc

libertine-container-manager:95: ERROR: create(): Failed to create container

This needs to be fixed before we can release LXD support to the archive and overlay.

Related branches

Revision history for this message
Christopher Townsend (townsend) wrote :

Things I've done so far to try to at least restore the ability to create an LXC:

1. Completely purged lxd and python3-libertine-lxd from the system.
2. Removed /etc/subuid and /etc/subgid and recreated them.
3. Remove ~/.config/lxc/default.conf and let l-c-m recreate it.

Revision history for this message
Christopher Townsend (townsend) wrote :

More updates:

I have a test machine that is running xenial overlay that has never had lxd installed on it nor python3-libertine-lxd and after fully updating, trying to create an lxc fails in the same manner. Something is very fishy...

Revision history for this message
Christopher Townsend (townsend) wrote :

Ok, I have figured this out and this is a problem with the current upstream release (1.4.4) as well, so we'll need a hotfix for this.

The problem is setting the lxc logging during the LibertineLXC init before the container creation is overriding LXC from looking for default.conf and thus, we have an invalid lxc configuration for container creation.

summary: - Creating an LXC type container fails after setting up an LXD type
- container
+ Creating an LXC type container fails
Changed in libertine (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

Fix committed into lp:libertine at revision None, scheduled for release in libertine, milestone Unknown

Changed in libertine:
status: In Progress → Fix Committed
Changed in libertine (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Christopher Townsend (townsend)
Revision history for this message
Gerry Boland (gerboland) wrote :

Note sure where to put this:

I installed silo 2341 as I was hitting this problem on my zesty machine, but now creating a container with container manager fails with:

Failed to download http://images.linuxcontainers.org//meta/1.0/index-user
LxcContainer.py:254: ERROR: create_libertine_container(): Failed to create container
libertine-container-manager:94: ERROR: create(): Failed to create container

This is odd, as networking is fine, and I can wget that URL successfully.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libertine - 1.5+17.04.20170105.1-0ubuntu1

---------------
libertine (1.5+17.04.20170105.1-0ubuntu1) zesty; urgency=medium

  [ Chris Townsend ]
  * Drop support for the Puritine click package as that is Vivid only
    and a Vivid Libertine branch exists for any future fixes.
  * Only set the lxc log when a container is defined during class init.
    (LP: #1653973)
  * Bump version to 1.5 for new upstream release.

  [ Larry Price ]
  * Logic for bundling libertine as a snap built from source.
  * Catch exceptions raised during container creation.
  * Initial implementation of lxd backend. (LP: #1580612)
  * Use the libertine logger and LIBERTINE_DEBUG variable everywhere.
  * Update configure bind-mount logic given new lxd backend.
  * Use dpkg to find package name when installing local deb.
  * Create d-bus service for lxd container management.

 -- Christopher Townsend <email address hidden> Thu, 05 Jan 2017 20:20:33 +0000

Changed in libertine (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
ventrical (dale-f-beaudoin) wrote :

I had 6 existing containers on one install of zesty with .deb apps installed and the last update/upgrade wiped out all the apps in the containers and in xapps.

Revision history for this message
Christopher Townsend (townsend) wrote :

@ventrical,

I assume your missing apps started with today's upgrade. Not sure how that would happen...could you open a new bug about your problem and in that bug include the libertine version you are using and also include the output of 'libertine-container-manager -i $container_id list-apps' (where $container_id is the id of your containers) shows your apps or not. Maybe something else is messed up.

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.