[lxc-users] lxc 2.0 => 3.0 and ubuntu.common.conf (and lxc-templates dpkg)
Christian Brauner
christian at brauner.io
Fri Jul 20 09:09:11 UTC 2018
On Tue, Jul 17, 2018 at 04:11:43PM -0400, Adrian Pepper wrote:
> > From arpepper at uwaterloo.ca Mon Jul 16 15:40:10 2018
> > From: AR Pepper <arpepper at uwaterloo.ca>
> > To: "lxc-users at lists.linuxcontainers.org"
> > <lxc-users at lists.linuxcontainers.org>
> > CC: AR Pepper <arpepper at uwaterloo.ca>
> >
> > This message devolved from a different query which is implied here together
> > with its answer. Perhaps this result will save some other people some time.
> >
> >
> > I just discovered a stupid user (lxc administrator) trick.
> >
> > Suppose you have an lxc setup you are migrating from Ubuntu 16.04 to 18.04.
> > (Going from lxc 2.0(2.0.8) to 3.0(3.0.1)).
> > (Doing a fresh install of Ubuntu 18.04 and modifying to match).
> >
> > If under Ubuntu 18.04 you install the "lxc" package, but not the
> > "lxc-templates" package, then, even after "lxc-update-config",
> > some of your lxc config files will fail because of...
> > (for example)
> >
> > lxc.include = /usr/share/lxc/config/ubuntu.common.conf
> >
> >
> > As an even stupider user trick, things seem to superficially work properly
> > if you simply remove the "ubuntu." from the config file, leaving
> >
> > lxc.include = /usr/share/lxc/config/common.conf
> >
> > It turns out /usr/share/lxc/config/ubuntu.common.conf (and many others)
> > are provided under Ubuntu by the "lxc-templates" package.
> >
> > Hmm. Could lxc-update-config (be changed to) remark upon the need for
> > the lxc-templates package? Or maybe just make a general observation
> > that the include file does not exist? ("Something is wrong")
>
> While waiting for the above message to actually appear, I thought of a
> perhaps better set of comments on the same thing. As a follow-up to
> Christian Brauner's packaging change announcement.
>
> I eventually wonder (below) if "lxc" could once again have "lxc-templates"
> as a dependency, even though "lxc-utils" does[should] not. Since "lxc"
> is now branded as a transitional package => lxc-utils.
That's a packaging call that Stéphane needs to make.
>
>
> Adrian Pepper
> arpepper at uwaterloo.ca
>
> > From lxc-users-bounces at lists.linuxcontainers.org Sat Apr 7 12:04:56 2018
> > From: Christian Brauner <christian.brauner at canonical.com>
> > Subject: [lxc-users] LXC 3.0.0: Packaging Changes To Be Aware Of
> >
> >
> > Hey everyone,
> >
> > LX{C,FS,D} upstream here. :)
> >
> [...]
> >
> > Here is a list of what we consider will most likely affect you as packagers:
> >
> > 1. **Important** the lxc-templates have been moved out of the main LXC tree
> > into a separate repository
> > https://github.com/lxc/lxc-templates
> >
> > This means that without this separate package LXC will now only come with
> > the following templates:
> >
> > lxc-busybox
> > lxc-download
> > lxc-local
> > lxc-oci
> >
>
> The templates had been in a separate "lxc-templates" package also in
> Ubuntu 16.04.
> But "lxc-templates" had been a dependency of the "lxc" package and
> was therefore dragged in automatically.
>
> But with the change indicated in the quoted announcement, it no longer
> gets so dragged in.
>
> But an unmentioned associated effect of not dragging in lxc-templates
> is that most of the files
> /usr/share/lxc/config/*.conf
> are no longer put in place.
>
> So "lxc-templates" must be installed not only to use the templates
> to generate new containers. It must be installed if you are going
> bring forward containers from Ubuntu 16.04 (lxc 2.0), which had been
> generated using templates.
>
> "lxc-update-config" works without complaint on containers whose config
> includes, for example
>
> lxc.include = /usr/share/lxc/config/ubuntu.common.conf
>
> But the containers still fail afterwards because the include is not
> satisfied. (They fail, that is, until "lxc-templates" is installed).
>
> (Assume here that a common way of producing an upgraded host system,
> e.g. Ubuntu 18.04 versus 16.04, is to produce a new minimal 18.04
> system and then apply all recorded "apt install" commands corresponding
> to actual desired packages (yes, modifications are sometimes needed,
> but...). The old 16.04 system need not have explicitly done "apt
> install lxc-templates" and so that could be overlooked in 18.04).
>
> Since "lxc" is now branded as a transitional package => lxc-utils,
> could "lxc" have lxc-templates as a dependency, even though lxc-utils
> will not?
>
>
> Adrian Pepper
> arpepper at uwaterloo.ca
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20180720/aca76e01/attachment.sig>
More information about the lxc-users
mailing list