GitHub | 29 Aug 16:28 2014

[lxc/lxc] d6559c: lxc-cgm: fix issue with nested chowning

  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: d6559c5d09c99e42b532a6259b98d4030dc5b616
      https://github.com/lxc/lxc/commit/d6559c5d09c99e42b532a6259b98d4030dc5b616
  Author: Serge Hallyn <serge.hallyn@...>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M src/lxc/cgmanager.c

  Log Message:
  -----------
  lxc-cgm: fix issue with nested chowning

To ask cgmanager to chown files as an unpriv user, we must send the
request from the container's namespace (with our own userid also
mapped in).  However when we create a new namespace then we must
open a new dbus connection, so that our credential and the credential
on the dbus socket match.  Otherwise the proxy will refuse the request.

Because we were warning about this failure but not exiting, the failure
was not noticed until the unprivileged container went on to try to
administer its cgroups, i.e. creating a container inside itself.

Fix this by having the do_chown_cgroup create a new cgmanager connection.
In order to reduce the number of connections, since the list of subsystems
is global anyway, don't call do_chown_cgroup once for each controller,
just call it once and have it run over all controllers.

(This patch does not change the fact that we don't fail if the
(Continue reading)

Serge Hallyn | 29 Aug 16:20 2014

[PATCH 1/1] lxc-cgm: fix issue with nested chowning

To ask cgmanager to chown files as an unpriv user, we must send the
request from the container's namespace (with our own userid also
mapped in).  However when we create a new namespace then we must
open a new dbus connection, so that our credential and the credential
on the dbus socket match.  Otherwise the proxy will refuse the request.

Because we were warning about this failure but not exiting, the failure
was not noticed until the unprivileged container went on to try to
administer its cgroups, i.e. creating a container inside itself.

Fix this by having the do_chown_cgroup create a new cgmanager connection.
In order to reduce the number of connections, since the list of subsystems
is global anyway, don't call do_chown_cgroup once for each controller,
just call it once and have it run over all controllers.

(This patch does not change the fact that we don't fail if the
chown failed.  I think we should change that, but let's do it in a
later patch)

Reported-by: Stéphane Graber <stgraber <at> ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn <at> ubuntu.com>
---
 src/lxc/cgmanager.c | 61 ++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 39 insertions(+), 22 deletions(-)

diff --git a/src/lxc/cgmanager.c b/src/lxc/cgmanager.c
index 4db61c1..97d19ca 100644
--- a/src/lxc/cgmanager.c
+++ b/src/lxc/cgmanager.c
 <at>  <at>  -261,19 +261,16  <at>  <at>  static bool lxc_cgmanager_escape(void)
(Continue reading)

KATOH Yasufumi | 28 Aug 12:51 2014
Picon

[PATCH v2] Remove a comment part from a config value

When a config line has a comment part, currently the comment part is
included in the value. This patch remove the comment from the value.

Signed-off-by: KATOH Yasufumi <karma <at> jazz.email.ne.jp>
---
 src/lxc/confile.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index 5de1241..ec5023c 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
 <at>  <at>  -1700,6 +1700,7  <at>  <at>  static int parse_line(char *buffer, void *data)
 	struct lxc_config_t *config;
 	char *line, *linep;
 	char *dot;
+	char *comment;
 	char *key;
 	char *value;
 	int ret = 0;
 <at>  <at>  -1743,6 +1744,9  <at>  <at>  static int parse_line(char *buffer, void *data)
 	*dot = '\0';
 	value = dot + 1;

+	comment = strstr(value, "#");
+	*comment = '\0';
+
 	key = line;
 	key[lxc_char_right_gc(key, strlen(key))] = '\0';

(Continue reading)

KATOH Yasufumi | 28 Aug 10:38 2014
Picon

[PATCH] Remove a comment part from a config value

When a config line has a comment part, currently the comment part is
included in the value. This patch remove the comment from the value.

Signed-off-by: KATOH Yasufumi <karma <at> jazz.email.ne.jp>
---
 src/lxc/confile.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index 5de1241..8aab5d0 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
 <at>  <at>  -1700,6 +1700,7  <at>  <at>  static int parse_line(char *buffer, void *data)
 	struct lxc_config_t *config;
 	char *line, *linep;
 	char *dot;
+        char *comment;
 	char *key;
 	char *value;
 	int ret = 0;
 <at>  <at>  -1743,6 +1744,11  <at>  <at>  static int parse_line(char *buffer, void *data)
 	*dot = '\0';
 	value = dot + 1;

+	comment = strstr(value, "#");
+	if (comment) {
+		*comment = '\0';
+	}
+
 	key = line;
(Continue reading)

GitHub | 27 Aug 16:47 2014

[lxc/lxc] b0e26c: doc: Translate lxc-checkpoint(1) into Japanese

  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: b0e26ca77b3bb9908dda4a27504e805f1b8b5ee0
      https://github.com/lxc/lxc/commit/b0e26ca77b3bb9908dda4a27504e805f1b8b5ee0
  Author: KATOH Yasufumi <karma@...>
  Date:   2014-08-27 (Wed, 27 Aug 2014)

  Changed paths:
    M configure.ac
    M doc/ja/Makefile.am
    A doc/ja/lxc-checkpoint.sgml.in

  Log Message:
  -----------
  doc: Translate lxc-checkpoint(1) into Japanese

Update for commit 735f2c6

Signed-off-by: KATOH Yasufumi <karma@...>
Acked-by: Stéphane Graber <stgraber@...>

_______________________________________________
lxc-devel mailing list
lxc-devel <at> lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
KATOH Yasufumi | 27 Aug 09:09 2014
Picon

[PATCH] doc: Translate lxc-checkpoint(1) into Japanese

Update for commit 735f2c6

Signed-off-by: KATOH Yasufumi <karma <at> jazz.email.ne.jp>
---
 configure.ac                  |   1 +
 doc/ja/Makefile.am            |   1 +
 doc/ja/lxc-checkpoint.sgml.in | 227 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 229 insertions(+)
 create mode 100644 doc/ja/lxc-checkpoint.sgml.in

diff --git a/configure.ac b/configure.ac
index 882e759..3e73d49 100644
--- a/configure.ac
+++ b/configure.ac
 <at>  <at>  -692,6 +692,7  <at>  <at>  AC_CONFIG_FILES([
 	doc/ja/lxc-autostart.sgml
 	doc/ja/lxc-cgroup.sgml
 	doc/ja/lxc-checkconfig.sgml
+	doc/ja/lxc-checkpoint.sgml
 	doc/ja/lxc-clone.sgml
 	doc/ja/lxc-config.sgml
 	doc/ja/lxc-console.sgml
diff --git a/doc/ja/Makefile.am b/doc/ja/Makefile.am
index a9c85a9..72e22fe 100644
--- a/doc/ja/Makefile.am
+++ b/doc/ja/Makefile.am
 <at>  <at>  -12,6 +12,7  <at>  <at>  man_MANS = \
 	lxc-autostart.1 \
 	lxc-cgroup.1 \
 	lxc-checkconfig.1 \
(Continue reading)

GitHub | 26 Aug 18:39 2014

[lxc/lxc] 0f9873: Add lxc-restore-net to extra_DIST

  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 0f987303e3642cb3c486ba74e56cd6e138c6b87e
      https://github.com/lxc/lxc/commit/0f987303e3642cb3c486ba74e56cd6e138c6b87e
  Author: Stéphane Graber <stgraber@...>
  Date:   2014-08-26 (Tue, 26 Aug 2014)

  Changed paths:
    M src/lxc/Makefile.am

  Log Message:
  -----------
  Add lxc-restore-net to extra_DIST

Signed-off-by: Stéphane Graber <stgraber@...>

_______________________________________________
lxc-devel mailing list
lxc-devel <at> lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
Travis CI | 26 Aug 17:19 2014

Fixed: lxc/lxc#656 (master - 188adf0)

lxc / lxc (master)
Build #656 was fixed.
1 minute and 8 seconds
Stéphane Graber 188adf0 Changeset →
  Fix build failure due to wrong test name

Signed-off-by: Stéphane Graber <stgraber-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>

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 | 26 Aug 17:11 2014

[lxc/lxc] 188adf: Fix build failure due to wrong test name

  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 188adf0594f623a1273b89a646402484b6816f90
      https://github.com/lxc/lxc/commit/188adf0594f623a1273b89a646402484b6816f90
  Author: Stéphane Graber <stgraber@...>
  Date:   2014-08-26 (Tue, 26 Aug 2014)

  Changed paths:
    M src/tests/Makefile.am

  Log Message:
  -----------
  Fix build failure due to wrong test name

Signed-off-by: Stéphane Graber <stgraber@...>

_______________________________________________
lxc-devel mailing list
lxc-devel <at> lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
Travis CI | 26 Aug 16:54 2014

Still Failing: lxc/lxc#655 (master - 88556fd)

lxc / lxc (master)
Build #655 is still failing.
2 minutes and 35 seconds
S.Çağlar Onur 88556fd Changeset →
  handle hashed command socket names (v2)

With the new hashed command socket names (e85898415c), it's possible to
have something like below;

[caglar <at> qop:~/go/src/github.com/lxc/go-lxc(master)] cat /proc/net/unix | grep lxc
0000000000000000: 00000002 00000000 00010000 0001 01 53465 <at> lxc/d086e835c86f4b8d/command
[...]

list_active_containers reads /proc/net/unix to find all running
containers but this new format no longer includes the container name or
its lxcpath.

This patch introduces two new commands (LXC_CMD_GET_NAME and
LXC_CMD_GET_LXCPATH) and starts to use those in list_active_containers
call.

changes since v1:
- added sanity check proposed by Serge

Signed-off-by: S.Çağlar Onur <caglar-mM0DFpta8ko@public.gmane.org>
Acked-by: Serge E. Hallyn <serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>

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 | 26 Aug 16:46 2014

Broken: lxc/lxc#654 (master - 735f2c6)

lxc / lxc (master)
Build #654 was broken.
3 minutes and 3 seconds
Tycho Andersen 735f2c6 Changeset →
  Add support for checkpoint and restore via CRIU

This patch adds support for checkpointing and restoring containers via CRIU.
It adds two api calls, ->checkpoint and ->restore, which are wrappers around
the CRIU CLI. CRIU has an RPC API, but reasons for preferring exec() are
discussed in [1].

To checkpoint, users specify a directory to dump the container metadata (CRIU
dump files, plus some additional information about veth pairs and which
bridges they are attached to) into this directory. On restore, this
information is read out of the directory, a CRIU command line is constructed,
and CRIU is exec()d. CRIU uses the lxc-restore-net callback (which in turn
inspects the image directory with the NIC data) to properly restore the
network.

This will only work with the current git master of CRIU; anything as of
a152c843 should work. There is a known bug where containers which have been
restored cannot be checkpointed [2].

[1]: http://lists.openvz.org/pipermail/criu/2014-July/015117.html
[2]: http://lists.openvz.org/pipermail/criu/2014-August/015876.html

v2: fixed some problems with the s/int/bool return code form api function
v3: added a testcase, fixed up the man page synopsis
v4: fix a small typo in lxc-test-checkpoint-restore
v5: remove a reference to the old CRIU_PATH, and a bad error about the same

Signed-off-by: Tycho Andersen <tycho.andersen <at> canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
Acked-by: Stéphane Graber <stgraber-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>

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

Gmane