LXC package for trusty no longer has configuration files

Bug #1590547 reported by Craig Maloney
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Did an upgrade this morning to the latest LXC package (via the updates channel).

LXC Package 2.0.1-0ubuntu1~ubuntu14.04.1 no longer has the configuration files under /usr/share/lxc/config. This causes lxc-ls to complain about missing template files.

lxc-ls: parse.c: lxc_file_for_each_line: 57 Failed to parse config: lxc.include = /usr/share/lxc/config/ubuntu.common.conf

Do I need to change the container's configuration to point to a new location?

Revision history for this message
Craig Maloney (craig-decafbad) wrote :

Copied over the config from lxc-2.0.1/config/templates to /usr/share/lxc/config and it appears to be working. So the files seem to be missing.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Could it be that you somehow don't have the lxc-templates package installed?

Revision history for this message
Craig Maloney (craig-decafbad) wrote :

I do, but the templates don't seem to have the .conf files:

craig@lister:~$ dpkg -L lxc-templates
/.
/usr
/usr/share
/usr/share/lxc
/usr/share/lxc/lxc-patch.py
/usr/share/lxc/templates
/usr/share/lxc/templates/lxc-gentoo
/usr/share/lxc/templates/lxc-centos
/usr/share/lxc/templates/lxc-oracle
/usr/share/lxc/templates/lxc-alpine
/usr/share/lxc/templates/lxc-fedora
/usr/share/lxc/templates/lxc-sshd
/usr/share/lxc/templates/lxc-altlinux
/usr/share/lxc/templates/lxc-opensuse
/usr/share/lxc/templates/lxc-download
/usr/share/lxc/templates/lxc-busybox
/usr/share/lxc/templates/lxc-ubuntu
/usr/share/lxc/templates/lxc-ubuntu-cloud
/usr/share/lxc/templates/lxc-openmandriva
/usr/share/lxc/templates/lxc-cirros
/usr/share/lxc/templates/lxc-plamo
/usr/share/lxc/templates/lxc-archlinux
/usr/share/lxc/templates/lxc-debian
/usr/share/doc
/usr/share/doc/lxc-templates
/usr/share/doc/lxc-templates/copyright
/usr/share/doc/lxc-templates/changelog.Debian.gz

Revision history for this message
Stéphane Graber (stgraber) wrote :

root@trusty:~# dpkg -L lxc-templates
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/lxc-templates
/usr/share/doc/lxc-templates/copyright
/usr/share/lxc
/usr/share/lxc/templates
/usr/share/lxc/templates/lxc-fedora
/usr/share/lxc/templates/lxc-plamo
/usr/share/lxc/templates/lxc-ubuntu
/usr/share/lxc/templates/lxc-openmandriva
/usr/share/lxc/templates/lxc-oracle
/usr/share/lxc/templates/lxc-gentoo
/usr/share/lxc/templates/lxc-altlinux
/usr/share/lxc/templates/lxc-sshd
/usr/share/lxc/templates/lxc-ubuntu-cloud
/usr/share/lxc/templates/lxc-opensuse
/usr/share/lxc/templates/lxc-archlinux
/usr/share/lxc/templates/lxc-sparclinux
/usr/share/lxc/templates/lxc-cirros
/usr/share/lxc/templates/lxc-busybox
/usr/share/lxc/templates/lxc-alpine
/usr/share/lxc/templates/lxc-slackware
/usr/share/lxc/templates/lxc-centos
/usr/share/lxc/templates/lxc-debian
/usr/share/lxc/templates/lxc-download
/usr/share/lxc/config
/usr/share/lxc/config/oracle.userns.conf
/usr/share/lxc/config/gentoo.common.conf
/usr/share/lxc/config/plamo.common.conf
/usr/share/lxc/config/nesting.conf
/usr/share/lxc/config/alpine.userns.conf
/usr/share/lxc/config/gentoo.moresecure.conf
/usr/share/lxc/config/ubuntu-cloud.userns.conf
/usr/share/lxc/config/centos.common.conf
/usr/share/lxc/config/slackware.userns.conf
/usr/share/lxc/config/oracle.common.conf
/usr/share/lxc/config/sparclinux.common.conf
/usr/share/lxc/config/common.seccomp
/usr/share/lxc/config/common.conf
/usr/share/lxc/config/ubuntu.common.conf
/usr/share/lxc/config/slackware.common.conf
/usr/share/lxc/config/plamo.userns.conf
/usr/share/lxc/config/debian.userns.conf
/usr/share/lxc/config/fedora.userns.conf
/usr/share/lxc/config/alpine.common.conf
/usr/share/lxc/config/opensuse.userns.conf
/usr/share/lxc/config/ubuntu.userns.conf
/usr/share/lxc/config/fedora.common.conf
/usr/share/lxc/config/common.conf.d
/usr/share/lxc/config/common.conf.d/README
/usr/share/lxc/config/ubuntu.lucid.conf
/usr/share/lxc/config/gentoo.userns.conf
/usr/share/lxc/config/centos.userns.conf
/usr/share/lxc/config/ubuntu-cloud.lucid.conf
/usr/share/lxc/config/archlinux.userns.conf
/usr/share/lxc/config/debian.common.conf
/usr/share/lxc/config/sparclinux.userns.conf
/usr/share/lxc/config/openwrt.common.conf
/usr/share/lxc/config/opensuse.common.conf
/usr/share/lxc/config/archlinux.common.conf
/usr/share/lxc/config/userns.conf
/usr/share/lxc/config/ubuntu-cloud.common.conf
/usr/share/lxc/lxc-patch.py
/usr/share/lxc/hooks
/usr/share/lxc/hooks/mountecryptfsroot
/usr/share/lxc/hooks/clonehostname
/usr/share/lxc/hooks/squid-deb-proxy-client
/usr/share/lxc/hooks/ubuntu-cloud-prep
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/lxc
/usr/lib/x86_64-linux-gnu/lxc/hooks
/usr/lib/x86_64-linux-gnu/lxc/hooks/unmount-namespace
/usr/share/doc/lxc-templates/changelog.Debian.gz
root@trusty:~#

Revision history for this message
Stéphane Graber (stgraber) wrote :

My guess is that you lxc-templates is from LXC 1.1 while the rest is LXC 2.0.

Partial upgrades aren't supported.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Can you show the output of

dpkg -l | grep lxc

?

Revision history for this message
Craig Maloney (craig-decafbad) wrote :

craig@lister:~$ dpkg -l | grep lxc
ii libclxclient3:amd64 3.9.0-1 amd64 X Window System C++ access library
ii liblxc1 2.0.1-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools (library)
ii lxc 2.0.1-0ubuntu1~ubuntu14.04.1 all Transitional package for lxc1
ii lxc-common 2.0.1-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools (common tools)
ii lxc-templates 1.0.8-0ubuntu0.3 amd64 Linux Containers userspace tools (templates)
ii lxc1 2.0.1-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools
ii lxcfs 2.0.1-0ubuntu1~ubuntu14.04.1 amd64 FUSE based filesystem for LXC
ii python3-lxc 2.0.1-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools (Python 3.x bindings)

So it's an old package, but I'm not offered the latest package when I try apt-get update && apt-get dist-upgrade.

What's the best way to fix this?

Revision history for this message
Craig Maloney (craig-decafbad) wrote :

root@lister:~# apt-cache madison lxc-templates
lxc-templates | 2.0.1-0ubuntu1~ubuntu14.04.1 | http://us.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
lxc-templates | 1.0.8-0ubuntu0.3 | http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
lxc-templates | 1.0.7-0ubuntu0.7 | http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
lxc-templates | 1.0.3-0ubuntu3 | http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
       lxc | 1.0.3-0ubuntu3 | http://us.archive.ubuntu.com/ubuntu/ trusty/main Sources
       lxc | 1.0.8-0ubuntu0.3 | http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main Sources
       lxc | 2.0.1-0ubuntu1~ubuntu14.04.1 | http://us.archive.ubuntu.com/ubuntu/ trusty-backports/main Sources
       lxc | 1.0.7-0ubuntu0.7 | http://security.ubuntu.com/ubuntu/ trusty-security/main Sources
root@lister:~# apt-get install lxc-templates
Reading package lists... Done
Building dependency tree
Reading state information... Done
lxc-templates is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@lister:~#

Revision history for this message
Craig Maloney (craig-decafbad) wrote :

root@lister:~# apt-get remove lxc-templates
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  lxc-templates
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 391 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 310044 files and directories currently installed.)
Removing lxc-templates (1.0.8-0ubuntu0.3) ...
root@lister:~# apt-get install lxc-templates
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  qemu-user-static
The following NEW packages will be installed:
  lxc-templates
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 63.0 kB of archives.
After this operation, 391 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main lxc-templates amd64 1.0.8-0ubuntu0.3 [63.0 kB]
Fetched 63.0 kB in 0s (327 kB/s)
Selecting previously unselected package lxc-templates.
(Reading database ... 310024 files and directories currently installed.)
Preparing to unpack .../lxc-templates_1.0.8-0ubuntu0.3_amd64.deb ...
Unpacking lxc-templates (1.0.8-0ubuntu0.3) ...
Setting up lxc-templates (1.0.8-0ubuntu0.3) ...

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

The version you have of the other lxc templates is from backports, so perhaps you need to manually request that?

apt install -t trusty-backports lxc-templates

or something. I never use backports, stgraber can probably help you, if the above does not work.

Revision history for this message
Craig Maloney (craig-decafbad) wrote :

Thank you, that did the trick.

Not sure how it got into that state though. Some guidance on what I did wrong would helpful. :)

Thanks again!

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1590547] Re: LXC package for trusty no longer has configuration files

Hi,

I suspect this points to a problem in the packaging - the lxc1 package
should probably have a >= versioned dependency on lxc-templates. That
way, apt install -t backports lxc1 would have automatically upgraded
lxc-templates for you.

So I do think this is a real bug in trusty-backports.

thanks for reporting this!

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lxc (Ubuntu):
status: New → Confirmed
Changed in lxc (Ubuntu):
status: Confirmed → Won't Fix
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.