Tycho Andersen | 16 Apr 20:40 2015

[PATCH 1/2] c/r: move criu code to its own file

Trying to cage the beast that is lxccontainer.c.

Signed-off-by: Tycho Andersen <tycho.andersen <at> canonical.com>
---
 src/lxc/Makefile.am    |   4 +-
 src/lxc/criu.c         | 477 +++++++++++++++++++++++++++++++++++++++++++++++++
 src/lxc/criu.h         |  70 ++++++++
 src/lxc/lxccontainer.c | 454 +---------------------------------------------
 4 files changed, 551 insertions(+), 454 deletions(-)
 create mode 100644 src/lxc/criu.c
 create mode 100644 src/lxc/criu.h

diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
index d8e460b..2731843 100644
--- a/src/lxc/Makefile.am
+++ b/src/lxc/Makefile.am
 <at>  <at>  -21,7 +21,8  <at>  <at>  noinst_HEADERS = \
 	namespace.h \
 	start.h \
 	state.h \
-	utils.h
+	utils.h \
+	criu.h

 if IS_BIONIC
 noinst_HEADERS += \
 <at>  <at>  -75,6 +76,7  <at>  <at>  liblxc_so_SOURCES = \
 	state.c state.h \
 	log.c log.h \
 	attach.c attach.h \
(Continue reading)

GitHub | 15 Apr 01:33 2015

[lxc/lxc] 5dc49b: Revert "lxc-cmd-stop: two fixes"

  Branch: refs/heads/stable-1.1
  Home:   https://github.com/lxc/lxc
  Commit: 5dc49b290c12d445baf677c1fd2649da80d6953b
      https://github.com/lxc/lxc/commit/5dc49b290c12d445baf677c1fd2649da80d6953b
  Author: Serge Hallyn <serge.hallyn@...>
  Date:   2015-04-14 (Tue, 14 Apr 2015)

  Changed paths:
    M src/lxc/commands.c

  Log Message:
  -----------
  Revert "lxc-cmd-stop: two fixes"

This breaks code that depended on the monitor being fully dead before
c->stop() returns.

This reverts commit 62e041610609c8913c3d397a521716819a91f850.

  Commit: 17f48b9679b2bb6d4e5d156fa59e6399f82277d9
      https://github.com/lxc/lxc/commit/17f48b9679b2bb6d4e5d156fa59e6399f82277d9
  Author: Serge Hallyn <serge.hallyn@...>
  Date:   2015-04-14 (Tue, 14 Apr 2015)

  Changed paths:
    M src/lxc/Makefile.am
    M src/lxc/conf.c
    M src/lxc/conf.h
    M src/lxc/confile.c
    M src/lxc/log.c
(Continue reading)

GitHub | 14 Apr 22:59 2015

[lxc/lxc] a16f71: Revert (by hand) "logs: introduce a thread-local '...

  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: a16f71a1d10ba626eb87297b0391b03b54de76e9
      https://github.com/lxc/lxc/commit/a16f71a1d10ba626eb87297b0391b03b54de76e9
  Author: Serge Hallyn <serge.hallyn@...>
  Date:   2015-04-14 (Tue, 14 Apr 2015)

  Changed paths:
    M src/lxc/Makefile.am
    M src/lxc/conf.c
    M src/lxc/conf.h
    M src/lxc/confile.c
    M src/lxc/log.c
    M src/lxc/log.h
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  Revert (by hand) "logs: introduce a thread-local 'current' lxc_config"

This is hopefully temporary - it works great for lxc itself, but seems
to be upsetting golang.

Signed-off-by: Serge Hallyn <serge.hallyn@...>
Tested-by: Tycho Andersen <tycho.andersen@...>

_______________________________________________
lxc-devel mailing list
(Continue reading)

GitHub | 14 Apr 21:57 2015

[lxc/lxc] d775f2: Revert "do_lxcap_stop: wait until container is sto...

  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: d775f21bb14950614e31b1e101a85817d4988305
      https://github.com/lxc/lxc/commit/d775f21bb14950614e31b1e101a85817d4988305
  Author: Serge Hallyn <serge.hallyn@...>
  Date:   2015-04-14 (Tue, 14 Apr 2015)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  Revert "do_lxcap_stop: wait until container is stopped"

This breaks lxc-test-concurrent.

This reverts commit fef9aa89e99285609d51848623f84ecd3a3109df.

  Commit: 95d5b1475f4a3f43c7574086af3de83ef9be4173
      https://github.com/lxc/lxc/commit/95d5b1475f4a3f43c7574086af3de83ef9be4173
  Author: Serge Hallyn <serge.hallyn@...>
  Date:   2015-04-14 (Tue, 14 Apr 2015)

  Changed paths:
    M src/lxc/commands.c

  Log Message:
  -----------
  Revert "lxc-cmd-stop: two fixes"

(Continue reading)

Tycho Andersen | 14 Apr 16:51 2015

[PATCH 1/2] c/r: rework external mountpoint handling v3

CRIU now supports autodetection of external mounts via the --ext-mount-map auto
--enable-external-sharing --enable-external-masters options, so we don't need
to explicitly pass the cgmanager mount or any of the mounts from the config.
This also means that lxcfs mounts (since they are bind mounts from outside the
container) are autodetected, meaning that c/r of containers using lxcfs works.

A further advantage of this patch is that it addresses some of the ugliness
that was in the exec_criu() function. There are other criu options that will
allow us to trim this even further, though.

Finally, with --enable-external-masters, criu understands slave mounts in the
container with shared mounts in the peer group that are outside the namespace.
This allows containers on a systemd host to be dumped and restored correctly.

However, these options have just landed in criu trunk today, and the next
tagged release will be 1.6 on June 1, so we should avoid merging this into any
stable releases until then.

v2: remount / as private before bind mounting the container's directory for
    criu. The problem here is that if / is mounted as shared, even if we
    unshare() the /var/lib/lxc/rootfs mountpoint propagates outside of our
    mount namespace, which is bad, since we don't want to leak mounts. In
    particular, this leak confuses criu the second time it goes to checkpoint
    the container.

v3: whoops, we really want / as MS_SLAVE | MS_REC here, to match what start
    does

Signed-off-by: Tycho Andersen <tycho.andersen <at> canonical.com>
---
(Continue reading)

GitHub | 14 Apr 16:30 2015

[lxc/lxc] fef9aa: do_lxcap_stop: wait until container is stopped

  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: fef9aa89e99285609d51848623f84ecd3a3109df
      https://github.com/lxc/lxc/commit/fef9aa89e99285609d51848623f84ecd3a3109df
  Author: Serge Hallyn <serge.hallyn@...>
  Date:   2015-04-14 (Tue, 14 Apr 2015)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  do_lxcap_stop: wait until container is stopped

In the past, lxc-cmd-stop would wait until the command pipe was closed
before returning, ensuring that the container monitor had exited.
Now that we accept the actual success return value, lxcapi_stop can
return success before the monitor has fully exited.

So explicitly wait for the container to stop, when lxc-cmd-stop returned
success.

Signed-off-by: Serge Hallyn <serge.hallyn@...>

_______________________________________________
lxc-devel mailing list
lxc-devel <at> lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
(Continue reading)

Harald Dunkel | 14 Apr 09:25 2015
Picon

lxc 1.1.2: "lxc-ls" vs "lxc-ls -P /var/lib/lxc"

Hi folks,

I get a weird effect on running lxc-ls without root:

{hdunkel <at> dpcl082:~ 507} lxc-ls
{hdunkel <at> dpcl082:~ 508} echo $?
0
{hdunkel <at> dpcl082:~ 509} lxc-ls -P /var/lib/lxc
.jessie                debbuild               template.blog
.mini                  lxc0
.squeeze               oraclient
.wheezy                p1
centos65               p2
{hdunkel <at> dpcl082:~ 510} echo $?
0
{hdunkel <at> dpcl082:~ 511} ls -l /var/lib/lxc
lrwxrwxrwx 1 root root 16 Aug  7  2014 /var/lib/lxc -> ../../export/lxc
{hdunkel <at> dpcl082:~ 512} ls -al /var/lib/../../export/lxc
total 180
drwxr-xr-x 32 root    root   4096 Apr 13 13:03 .
drwxrwxrwt 22 root    root   4096 Feb  2 09:52 ..
drwxr-xr-x  3 root    root   4096 Aug 19  2014 .jessie
drwxr-xr-x  3 root    root   4096 Nov 20  2013 .mini
drwxr-xr-x  3 root    root   4096 Nov 20  2013 .squeeze
drwxr-xr-x  3 root    root   4096 Aug 19  2014 .wheezy
-rw-r--r--  1 root    root    781 Jul  2  2014 README
drwxr-xr-x  4 root    root   4096 Jan 21  2014 centos65
drwxr-xr-x  3 root    root   4096 Oct 17 07:46 debbuild
-rw-r--r--  1 root    root  19973 Jan 23 09:33 lxc-monitord.log
drwxrwxr-x  3 root    root   4096 Mar 18 16:23 lxc0
(Continue reading)

Travis CI | 14 Apr 01:08 2015

Fixed: lxc/lxc#946 (stable-1.1 - 3149bd4)

lxc / lxc (stable-1.1)
Build #946 was fixed.
58 seconds
Tycho Andersen 3149bd4 Changeset →
  don't compare unsigned values as negative ones

Instead, check that the result is larger than its parts.

Signed-off-by: Tycho Andersen <tycho.andersen-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Acked-by: Stéphane Graber <stgraber-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>

Travis CI supports Rails Girls Summer of Code 2015

Please join us in helping to get more women into Open Source. Read more ...

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! Sign up here.

Would you like to test your private code?

Travis Pro could be your new best friend!

_______________________________________________
lxc-devel mailing list
lxc-devel <at> lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
Travis CI | 14 Apr 01:08 2015

Fixed: lxc/lxc#945 (master - 69f97e3)

lxc / lxc (master)
Build #945 was fixed.
1 minute and 16 seconds
Tycho Andersen 69f97e3 Changeset →
  don't compare unsigned values as negative ones

Instead, check that the result is larger than its parts.

Signed-off-by: Tycho Andersen <tycho.andersen-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Acked-by: Stéphane Graber <stgraber-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>

Travis CI supports Rails Girls Summer of Code 2015

Please join us in helping to get more women into Open Source. Read more ...

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! Sign up here.

Would you like to test your private code?

Travis Pro could be your new best friend!

_______________________________________________
lxc-devel mailing list
lxc-devel <at> lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
GitHub | 14 Apr 01:04 2015

[lxc/lxc] 3149bd: don't compare unsigned values as negative ones

  Branch: refs/heads/stable-1.1
  Home:   https://github.com/lxc/lxc
  Commit: 3149bd4c0e81973b3db2e1230bd1784dc222a4ed
      https://github.com/lxc/lxc/commit/3149bd4c0e81973b3db2e1230bd1784dc222a4ed
  Author: Tycho Andersen <tycho.andersen@...>
  Date:   2015-04-13 (Mon, 13 Apr 2015)

  Changed paths:
    M src/lxc/utils.c

  Log Message:
  -----------
  don't compare unsigned values as negative ones

Instead, check that the result is larger than its parts.

Signed-off-by: Tycho Andersen <tycho.andersen@...>
Acked-by: St├ęphane Graber <stgraber@...>

_______________________________________________
lxc-devel mailing list
lxc-devel <at> lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
GitHub | 14 Apr 01:04 2015

[lxc/lxc] 69f97e: don't compare unsigned values as negative ones

  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 69f97e3c12fb76cb7e7f740dc0bcd0aadf14451f
      https://github.com/lxc/lxc/commit/69f97e3c12fb76cb7e7f740dc0bcd0aadf14451f
  Author: Tycho Andersen <tycho.andersen@...>
  Date:   2015-04-13 (Mon, 13 Apr 2015)

  Changed paths:
    M src/lxc/utils.c

  Log Message:
  -----------
  don't compare unsigned values as negative ones

Instead, check that the result is larger than its parts.

Signed-off-by: Tycho Andersen <tycho.andersen@...>
Acked-by: St├ęphane Graber <stgraber@...>

_______________________________________________
lxc-devel mailing list
lxc-devel <at> lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Gmane