[lxc-devel] [lxc/lxc] de9a4b: Discontinue the use of in-line comments

GitHub noreply at github.com
Fri Sep 19 22:16:29 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: de9a4bfc2c488aef0055a25af834be9b22738cf0
      https://github.com/lxc/lxc/commit/de9a4bfc2c488aef0055a25af834be9b22738cf0
  Author: Stéphane Graber <stgraber at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M config/templates/common.conf.in

  Log Message:
  -----------
  Discontinue the use of in-line comments

Those aren't supported, it's just a lucky coincidence that they weren't
causing problems.

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: 67702c2129c462b5e8124020a496fbf6b7ae5540
      https://github.com/lxc/lxc/commit/67702c2129c462b5e8124020a496fbf6b7ae5540
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/confile.c
    M src/lxc/confile.h
    M src/lxc/lxccontainer.c
    M src/tests/Makefile.am
    A src/tests/lxc-test-cloneconfig

  Log Message:
  -----------
  config: fix the handling of lxc.hook and hwaddrs in unexpanded config

And add a testcase.

The code to update hwaddrs in a clone was walking through the container
configuration and re-printing all network entries.  However network
entries from an include file which should not be printed out were being
added to the unexpanded config.  With this patch, at clone we simply
update the hwaddr in-place in the unexpanded configuration file, making
sure to make the same update to the expanded network configuration.

The code to update out lxc.hook statements had the same problem.
We also update it in-place in the unexpanded configuration, though
we mirror the logic we use when updating the expanded configuration.
(Perhaps that should be changed, to simplify future updates)

This code isn't particularly easy to review, so testcases are added
to make sure that (1) extra lxc.network entries are not added (or
removed), even if they are present in an included file, (2) lxc.hook
entries are not added, (3) hwaddr entries are updated, and (4)
the lxc.hook entries are properly updated (only when they should be).

Reported-by: Stéphane Graber <stgraber at ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: d0348408b5fa226bf7f8031c6abf2d5d2a28ba33
      https://github.com/lxc/lxc/commit/d0348408b5fa226bf7f8031c6abf2d5d2a28ba33
  Author: TAMUKI Shoichi <tamuki at linet.gr.jp>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M templates/lxc-plamo.in

  Log Message:
  -----------
  lxc-plamo: keep original uid/gid of files/dirs when installing

Regardless of whether "installpkg" command exists or not, install the
command temporarily with static linked tar command into the lxc cache
directory to keep the original uid/gid of files/directories.  Also,
use sed command instead of ed command for simplicity.

Signed-off-by: TAMUKI Shoichi <tamuki at linet.gr.jp>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 7c8f5230847bf8ce51b378f9d6271f56574a324b
      https://github.com/lxc/lxc/commit/7c8f5230847bf8ce51b378f9d6271f56574a324b
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  lxc-checkpoint: use --force-irmap criu option

This option is required when migrating containers across hosts; it is used to
restore inotify via file paths instead of file handles, which aren't preserved
across hosts.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: 5f845c928afc5c36f4c06771ce1814a16df3f5a5
      https://github.com/lxc/lxc/commit/5f845c928afc5c36f4c06771ce1814a16df3f5a5
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/tests/lxc-test-checkpoint-restore

  Log Message:
  -----------
  Allow criu >= 1.3 in c/r test

criu version 1.3 has been tagged, which has the minimal set of patches to allow
checkpointing and restoring containers. lxc-test-checkpoint-restore is now
skipped on any version of criu lower than 1.3.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: 6d5b330dc05f5cd84197057be111ad4fd0939a85
      https://github.com/lxc/lxc/commit/6d5b330dc05f5cd84197057be111ad4fd0939a85
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  Exit on errors in restore()'s worker

If we just return here, we end up with two processes executing the caller's
code, which is not good.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: 3b72c4a0ee2a6ea89aa6478b4db1d53a56e11971
      https://github.com/lxc/lxc/commit/3b72c4a0ee2a6ea89aa6478b4db1d53a56e11971
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/lxccontainer.c
    M src/lxc/start.c
    M src/lxc/start.h

  Log Message:
  -----------
  finalize handler in lxcapi_restore

We can also narrow the scope of this, since we only need it in the process that
is actually going to use it.

Reported-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: dc5518b82e04326639f4b60ebcdb69a4072d0c1c
      https://github.com/lxc/lxc/commit/dc5518b82e04326639f4b60ebcdb69a4072d0c1c
  Author: TAMUKI Shoichi <tamuki at linet.gr.jp>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M templates/lxc-gentoo.in

  Log Message:
  -----------
  lxc-gentoo: keep original uid/gid of files/dirs when installing

Call tar with --numeric-owner option to use numbers for user/group
names because the whole uid/gid in rootfs should be consistently
unchanged as in original stage3 tarball and private portage.

Signed-off-by: TAMUKI Shoichi <tamuki at linet.gr.jp>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 22038de5f2a4db53f9ce3bc72625b6763a0b3fc6
      https://github.com/lxc/lxc/commit/22038de5f2a4db53f9ce3bc72625b6763a0b3fc6
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/conf.c

  Log Message:
  -----------
  lxc_map_ids: add a comment

Explain why we insist that root use newuidmap if it is available.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 74bcefea48f73569ec6e91adb410e84efe46d3b8
      https://github.com/lxc/lxc/commit/74bcefea48f73569ec6e91adb410e84efe46d3b8
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  c/r: use --restore-sibling option in CRIU

After looking through some logs, it is a little cleaner to do it as
below, instead of what I originally posted.

Tycho

In order for LXC to be the parent of the restored process, CRIU needs to
restore init as its sibling, not as its child. This was previously accomplished
essentially via luck :). CRIU now has a --restore-sibling option which forces
this behavior that LXC expects. See more discussion in this thread:
http://lists.openvz.org/pipermail/criu/2014-September/thread.html#16330

v2: don't pass --restore-sibling to dump. This is mostly cosmetic, but will
    look less confusing in the logs if people ever look at them.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: d48d22299d4fc5635f289e4a34967e6cd99cd743
      https://github.com/lxc/lxc/commit/d48d22299d4fc5635f289e4a34967e6cd99cd743
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/tests/lxc-test-checkpoint-restore

  Log Message:
  -----------
  tests: require criu >= 1.3.1 for criu test

CRIU 1.3 has a pretty crippling deadlock which will cause dumping containers to
fail fairly often. This is fixed in criu 1.3.1, so we shouldn't run the tests
on anything less than that.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: b56d64e0c5eb9b053fa30761c3ced6e36fb828af
      https://github.com/lxc/lxc/commit/b56d64e0c5eb9b053fa30761c3ced6e36fb828af
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/lxc_checkpoint.c

  Log Message:
  -----------
  lxc-checkpoint should actually log things

Looks like lxc-checkpoint was missing the log inititalization code, so it never
actually logged anything when the options were provided.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: d96b7d0ee168b782dd4b3cf5608082e9cdc5f060
      https://github.com/lxc/lxc/commit/d96b7d0ee168b782dd4b3cf5608082e9cdc5f060
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/cgmanager.c

  Log Message:
  -----------
  support use of 'all' containers when cgmanager supports it

Introduce a new list of controllers just containing "all".

Make the lists of controllers null-terminated.

If the cgmanager api version is high enough, use the 'all' controller
rather than walking all controllers, which should greatly reduce the
amount of dbus overhead.  This will be especially important for
those going through a cgproxy.

Also remove the call to cleanup cgroups when a cgroup existed.  That
usually fails (and failure is ignored) since the to-be-cleaned-up
cgroup is busy, but we shouldn't even be trying.  Note this can
create for extra un-cleanedup cgroups, however it's better than us
accidentally removing a cgroup that someone else had created and was
about to use.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 01db0197519289988a81ea71a2e99fb3fd24e592
      https://github.com/lxc/lxc/commit/01db0197519289988a81ea71a2e99fb3fd24e592
  Author: William Dauchy <william at gandi.net>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/log.c

  Log Message:
  -----------
  log: fix quiet mode

quiet mode was overriden by the double call of lxc_log_init
see lxc_container_new

use lxc_log_options_no_override in order to fix this

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Signed-off-by: William Dauchy <william at gandi.net>


Compare: https://github.com/lxc/lxc/compare/1787abcae0f5...01db01975192


More information about the lxc-devel mailing list