[lxc-users] Suggestions regarding (ultimately) LXC 2.1.0 lxc-update-config

Adrian Pepper arpepper at uwaterloo.ca
Thu Oct 5 16:58:27 UTC 2017


Another followup suggests my suggestions (at least regarding
lxc-update-config itself) have been covered.

I will try to investigate the script and those changes since it is
something which can be done without knowledge of actual lxc internals.
While we use containers heavily in our department, much of my
personal lxc use (including accidentally running into 2.1.0 at all,
because of a forgotten ppa) pushes the bounds of approved activity.
And I have never looked into the actual implementation of lxc at all.

Could/should there be an lxc-config-lint (lxc-lint-config?) which would
warn of upcoming problems?

Just as a suggestion, could it be arranged that "lxc.pivotdir" (etc)
prevent lxc-start, but would not sabotage "lxc-ls" ("lxc-ls -f") ?
As another stage of obsolete.  Maybe status could be "RUNNING",
"STOPPED" or "OBSOLETE".  From a lxc-user point-of-view something like
this seems like what one would want.  (Or perhaps a separate "Will start"
field/flag...)

But I infer from reading parts of the thread, people don't want to
retain lots of information about dead(zombie?) options(keys).  Perhaps
a "lint" of some sort could help that goal.  (Especially if it could
get run in some situations without the lxc-user explicitly invoking it).
(It's not clear to me if lxc-ls, specifically, would have difficulty
detecting general container/config compliance while tolerating arbitrary
detail errors so as to generate a report for a broken container
indicating that it, in some sense, exists but is broken and cannot
start; generalizing that error detection might prevent the need for
retaining specific information about zombie keys).

And related, when I did "lxc-ls -f" on my workstation and got 2x62
lines of anonymous complaints about "legacy configuration keys" on
stderr, plus a few fatal complaints, and a somewhat reduced list of
known containers, it seemed it could be more lxc-user-friendly.
If the names of the containers had been in the diagnostics, it would
have helped with automating the necessary updates.


Adrian Pepper
arpepper at uwaterloo.ca

> From lxc-users-bounces at lists.linuxcontainers.org Wed Oct  4 19:55:54 2017
> From: "Serge E. Hallyn" <serge at hallyn.com>
> To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>
> Cc: lxc-devel at lists.linuxcontainers.org
> Subject: Re: [lxc-users] Suggestions regarding (ultimately) LXC 2.1.0
>  lxc-update-config
> 
> agreed to both, lxc-update-config should delete it, and it should be
> (initially the only) member of a (new) group of keys to ignore, bc
> it cannot possibly hurt.  Do you happen to have time to write one
> or both patches?
> 
> thanks,
> -serge
> 
> On Wed, Oct 04, 2017 at 03:35:08PM -0400, Adrian Pepper wrote:
> > Does mentioning lxc.pivotdir really need to be a fatal error?  Currently
> > it seems fatal to the degree that "lxc-ls -f" does not show the
> > container at all, not RUNNING and not STOPPED.
> > 
> > Or, at least, could the lxc-update-config command be modified to
> > effectively delete mentions of lxc.pivotdir?
> > (Comment out or delete it; I see lxc.rootfs.backend gets deleted by
> > lxc-update-config; it might be nice if that also was done as commenting
> > out, instead).
> > It seems that "lxc-update-config" currently just leaves lxc.pivotdir alone.
> > (In the following version).
> > 
> > -rwxr-xr-x 1 root root 3791 Sep 21 14:35 /usr/bin/lxc-update-config
> > (Ubuntu 16.04)
> > 
> > 
> > The messages indicating the need to update the config should be
> > improved to name the config file in question, and mention the
> > lxc-update-config command.
> > 
> > Perhaps...
> > 
> >   < The configuration file contains legacy configuration keys.
> >   < Please update your configuration file!
> >   ---
> >   > /var/lib/lxc/u1204-postfix-1/config contains legacy configuration keys.
> >   > "lxc-update-config" can be used to update most configuration files.
> > 
> > 
> > Oh, and "lxc-update-config" does not accept "--version".
> > 
> > 
> > Adrian Pepper
> > arpepper at uwaterloo.ca
> > 
> > 
> > Actual diagnostics associated with lxc.pivotdir...
> > 
> > lxc-start: u1204-postfix-1: confile.c: parse_line: 1982 Unknown configuration key "lxc.pivotdir"
> > lxc-start: u1204-postfix-1: parse.c: lxc_file_for_each_line: 58 Failed to parse config: lxc.pivotdir = lxc_putold
> > 
> > lxc-start: u1204-postfix-1: tools/lxc_start.c: main: 286 Failed to create lxc_container
> > 
> > 
> > _______________________________________________
> > lxc-users mailing list
> > lxc-users at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-users
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
> 



More information about the lxc-users mailing list