[lxc-devel] [lxc/lxc] 7d40e5: Update Japanese pam_cgfs(8) to reflect lack of sup...

2020-12-04 Thread Tycho Andersen
--- commands_utils: fix lxc-wait Closes: #3570 Fixes: 7792a5b60f79 ("commands: add additional check to lxc_cmd_sock_get_state()") Signed-off-by: Christian Brauner Commit: 92bc70903c8e9ca920503bcf288934a9e8f12e1f https://github.com/lxc/lxc/commit/92bc70903c8e9ca

[lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-19 Thread Tycho Andersen
: http://lists.openvz.org/pipermail/criu/2014-July/015117.html [2]: http://lists.openvz.org/pipermail/criu/2014-August/015876.html Signed-off-by: Tycho Andersen --- .gitignore | 2 + configure.ac | 24 +++ doc/Makefile.am| 2 + doc/lxc-checkpoint.sgml.in

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-20 Thread Tycho Andersen
Hi Stéphane, On Tue, Aug 19, 2014 at 10:40:15PM -0500, Stéphane Graber wrote: > On Tue, Aug 19, 2014 at 10:14:03PM -0500, Tycho Andersen wrote: > > This patch adds support for checkpointing and restoring containers via CRIU. > > It adds two api calls, ->checkpoint and -&

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-20 Thread Tycho Andersen
On Wed, Aug 20, 2014 at 09:50:28AM -0500, Stéphane Graber wrote: > On Wed, Aug 20, 2014 at 07:32:34AM -0500, Tycho Andersen wrote: > > Hi Stéphane, > > > > On Tue, Aug 19, 2014 at 10:40:15PM -0500, Stéphane Graber wrote: > > > On Tue, Aug 19, 2014 at 10:14:03

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-20 Thread Tycho Andersen
Hi Stéphane, On Wed, Aug 20, 2014 at 10:34:55AM -0500, Tycho Andersen wrote: > > Sounds good, I will make the changes. Below is a revised version of the patch. Tycho This patch adds support for checkpointing and restoring containers via CRIU. It adds two api calls, ->checkpoint and

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-20 Thread Tycho Andersen
Hi Stéphane, On Wed, Aug 20, 2014 at 05:19:14PM -0500, Stéphane Graber wrote: > On Wed, Aug 20, 2014 at 02:31:05PM -0500, Tycho Andersen wrote: > > > > +# criu > > +AC_ARG_ENABLE([criu], > > + [AC_HELP_STRING([--enable-criu], [enable checkpoint/restore

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-21 Thread Tycho Andersen
Hi Stéphane, On Wed, Aug 20, 2014 at 05:19:14PM -0500, Stéphane Graber wrote: > On Wed, Aug 20, 2014 at 02:31:05PM -0500, Tycho Andersen wrote: > > Hi Stéphane, > > > > On Wed, Aug 20, 2014 at 10:34:55AM -0500, Tycho Andersen wrote: > > > > > &g

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-21 Thread Tycho Andersen
Hi Serge, On Fri, Aug 22, 2014 at 12:09:31AM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Hi Stéphane, > > > > On Wed, Aug 20, 2014 at 05:19:14PM -0500, Stéphane Graber wrote: > > > On Wed, Aug 20, 2014 at 02:31:05

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-21 Thread Tycho Andersen
On Fri, Aug 22, 2014 at 04:00:40AM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Hi Serge, > > > > On Fri, Aug 22, 2014 at 12:09:31AM +, Serge Hallyn wrote: > > > Quoting Tycho Andersen (tycho.ander...@canon

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-22 Thread Tycho Andersen
On Fri, Aug 22, 2014 at 04:36:37AM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Thanks, Tycho. Just one remaining request below. Other than that, > > Acked-by: Serge E. Hallyn > > > +static bool lxcapi_checkpoint(struc

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-22 Thread Tycho Andersen
On Fri, Aug 22, 2014 at 07:45:06AM -0500, Tycho Andersen wrote: > > Maybe just a test and then return false? Here's a version that does this. Tycho This patch adds support for checkpointing and restoring containers via CRIU. It adds two api calls, ->checkpoint and ->restore, w

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-22 Thread Tycho Andersen
On Fri, Aug 22, 2014 at 08:03:32AM -0500, Tycho Andersen wrote: > On Fri, Aug 22, 2014 at 07:45:06AM -0500, Tycho Andersen wrote: > > > > Maybe just a test and then return false? > > Here's a version that does this. Whoops, I forgot to change lxc_checkpoint.c to re

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-24 Thread Tycho Andersen
Hi Serge, On Sat, Aug 23, 2014 at 02:29:46AM +, Serge Hallyn wrote: > Hm, was trying this out tonight, but I keep getting > > sh: 1: /usr/lib/x86_64-linux-gnu/lxc/lxc-restore-net: not found > > despite the fact that I most certainly did copy lxc-restore-net into place: > > -rwxr-xr-x 1 root

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-24 Thread Tycho Andersen
: 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 Signed-off-by: Tycho Andersen Acked-by: S

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-24 Thread Tycho Andersen
sis v4: fix a small typo in lxc-test-checkpoint-restore Signed-off-by: Tycho Andersen Acked-by: Serge E. Hallyn --- .gitignore| 1 + configure.ac | 1 + doc/Makefile.am | 1 + doc/lxc-checkpoint.sgml.in

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-26 Thread Tycho Andersen
On Mon, Aug 25, 2014 at 04:25:28PM -0400, Stéphane Graber wrote: > On Sun, Aug 24, 2014 at 02:43:53PM -0500, Tycho Andersen wrote: > > > > + if (!ret) { > > + fprintf(stderr, "Checkpointing %s failed.\n", my_args.name); >

[lxc-devel] [PATCH 1/3] Allow criu >= 1.3 in c/r test

2014-09-02 Thread Tycho Andersen
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 --- src/tests/lxc-test-checkpoint-restore | 8 +++- 1 file

[lxc-devel] [PATCH 2/3] Exit on errors in restore()'s worker

2014-09-02 Thread Tycho Andersen
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 --- src/lxc/lxccontainer.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index ee

[lxc-devel] [PATCH 3/3] finalize handler in lxcapi_restore

2014-09-02 Thread Tycho Andersen
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 Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 43 ++- src/lxc/start.c| 2 +- src/lxc/start.h

Re: [lxc-devel] [PATCH 1/3] Allow criu >= 1.3 in c/r test

2014-09-05 Thread Tycho Andersen
On Thu, Sep 04, 2014 at 10:04:34PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > criu version 1.3 has been tagged, which has the minimal set of patches to > > allow > > checkpointing and restoring containers. lxc-test-checkpoint-resto

[lxc-devel] [PATCH] lxc-checkpoint: use --force-irmap criu option

2014-09-05 Thread Tycho Andersen
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 --- src/lxc/lxccontainer.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-)

[lxc-devel] Updates for criu 1.3.1

2014-09-12 Thread Tycho Andersen
CRIU's 1.3.1 point release fixed a serious deadlock and also added an option that LXC should use. These patches are on top of my other patches that are on the mailing list, so those can be applied first. Tycho ___ lxc-devel mailing list lxc-devel@lists.

[lxc-devel] [PATCH 2/2] tests: require criu >= 1.3.1 for criu test

2014-09-12 Thread Tycho Andersen
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 --- src/tests/lxc-test-checkpoint-restore | 2 +- 1 file changed, 1 inse

[lxc-devel] [PATCH 1/2] c/r: use --restore-sibling option in CRIU

2014-09-12 Thread Tycho Andersen
: http://lists.openvz.org/pipermail/criu/2014-September/thread.html#16330 Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index ff5167a..8c75267 100644 --- a/src/lxc

Re: [lxc-devel] [PATCH 1/2] c/r: use --restore-sibling option in CRIU

2014-09-12 Thread Tycho Andersen
On Fri, Sep 12, 2014 at 11:07:14PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > 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 &

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-09-16 Thread Tycho Andersen
On Tue, Sep 16, 2014 at 11:11:04PM +, Zmudzinski, Krystof C wrote: > I've added DECLARE_ARG("--evasive-devices"); in lxccontainer.c/exec_criu and > I was finally able to dump the container. Ok, I've been trying to produce a situation where this is necessary but I couldn't. Can you paste your

Re: [lxc-devel] [CRIU] [PATCH] Add support for checkpoint and restore via CRIU

2014-09-17 Thread Tycho Andersen
On Wed, Sep 17, 2014 at 01:43:59PM +0400, Pavel Emelyanov wrote: > On 09/17/2014 03:11 AM, Zmudzinski, Krystof C wrote: > > > Lastly, could criu dump the entire command line to the logs when it is > > executed? > > This patch would be greatly appreciated :) This would be simple enough to do in

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-09-17 Thread Tycho Andersen
eckpoint/restore.log -vv --root /usr/local/lib/lxc/rootfs > --restore-detached --pidfile /tmp/fileGCxb5C --veth-pair eth0 vethSID6CM > > -Original Message- > From: lxc-devel [mailto:lxc-devel-boun...@lists.linuxcontainers.org] On > Behalf Of Tycho Andersen > Se

Re: [lxc-devel] Your message to lxc-devel awaits moderator approval

2014-09-17 Thread Tycho Andersen
Hi Krystof, On Wed, Sep 17, 2014 at 10:22:57PM +, Zmudzinski, Krystof C wrote: > Sorry, guys but I included all kinds of logs and the message is too big. But > I think Tycho would like to see it. Alternatively, you can paste it somewhere (e.g. http://paste.ubuntu.com) and I can take a look

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-09-17 Thread Tycho Andersen
bility, if you are trying to migrate containers across hosts. If not, though, passing -s to lxc-checkpoint when you dump the container will hopefully solve your problem. Tycho > Krystof > > -Original Message- > From: lxc-devel [mailto:lxc-devel-boun...@lists.linuxcontainers.org]

[lxc-devel] [PATCH] lxc-checkpoint should actually log things

2014-09-18 Thread Tycho Andersen
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 --- src/lxc/lxc_checkpoint.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/lxc/lxc_checkpoint.c b/src/lxc

[lxc-devel] [PATCH 1/2] lxc-checkpoint should fail if criu gets signal

2014-09-24 Thread Tycho Andersen
The ->checkpoint() API call didn't exit correctly if criu was killed by a signal instead of exiting, so lxc-checkpoint didn't fail correctly as a result. Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxccont

[lxc-devel] [PATCH 2/2] Initialize cgroups on lxc-checkpoint -r

2014-09-24 Thread Tycho Andersen
With cgmanager, the cgroups are polled on demand, so these steps aren't needed. However, with cgfs, lxc doesn't know about the cgroups for a container and so it can't report any of the statistics about e.g. how much memory or CPU a container is using. Signed-off-by: Tycho Anderse

[lxc-devel] [PATCH] lxc-checkpoint: close stdout/stdin when daemonizing

2014-09-30 Thread Tycho Andersen
If we don't close these running lxc-checkpoint via: ssh host "sudo lxc-checkpoint ..." just hangs. We leave stderr open so that subesquent errors will print correctly (and also because for whatever reason it doesn't break ssh :). Signed-off-by: Tycho Andersen --- src/lxc/

[lxc-devel] pre-create cgroups during restore from container checkpoint

2014-10-07 Thread Tycho Andersen
Hi all, Based on some discussion on the criu list, we need to explicitly create the cgroups we would like to restore into ourselves, so that the restore goes correctly. There are also a few problems (as mentioned in the patch commit) if we don't do this. Tycho ___

[lxc-devel] [PATCH 1/2] restore: Hoist handler to function level

2014-10-07 Thread Tycho Andersen
This commit is in preparation for the cgroups create work, since we will need the handler in both the parent and the child. This commit also re-works how errors are propagated to be less verbose. Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 70

[lxc-devel] [PATCH 2/2] restore: create cgroups for criu

2014-10-07 Thread Tycho Andersen
an alive container in u1-3). Instead, we use lxc's cgroup_create, and then tell criu where to restore to. Signed-off-by: Tycho Andersen --- src/lxc/cgfs.c | 36 +++- src/lxc/cgmanager.c| 11 ++- src/lxc/cgroup.c

Re: [lxc-devel] [PATCH 1/2] restore: Hoist handler to function level

2014-10-08 Thread Tycho Andersen
On Tue, Oct 07, 2014 at 07:33:07PM +, Tycho Andersen wrote: > This commit is in preparation for the cgroups create work, since we will need > the handler in both the parent and the child. This commit also re-works how > errors are propagated to be less verbose. Here is an update

[lxc-devel] [PATCH 0/2] criu: DECLARE_ARG should check for null arguments

2014-10-08 Thread Tycho Andersen
This is in preparation for the cgroups creation work, but also probably just a good idea in general. The ERROR message is handy since we print line nos. it will to give people an indication of what arg was null. Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 14 +- 1

[lxc-devel] [PATCH] c/r: factor out network dump/restore code

2014-10-10 Thread Tycho Andersen
Break the monolithic ->checkpoint and ->restore functions into smaller ones. This is in preparation for the checkpoint/restore tty work, which has a similar need to dump information outside of criu. Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c

[lxc-devel] [PATCH 2/2] c/r: use sizeof instead of magic numbers

2014-10-16 Thread Tycho Andersen
Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 61d06ea..b9eab17 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -3591,16 +3591,16

[lxc-devel] [PATCH 1/2] c/r: refactor the way we pass data to criu/scripts

2014-10-16 Thread Tycho Andersen
, and then changing the bridge name in the container's configuration before running lxc-checkpoint. Signed-off-by: Tycho Andersen --- src/lxc/lxc-restore-net | 16 +++--- src/lxc/lxccontainer.c | 126 +++- 2 files changed, 68 insertions(+), 74 del

Re: [lxc-devel] [PATCH 1/2] c/r: refactor the way we pass data to criu/scripts

2014-10-16 Thread Tycho Andersen
On Thu, Oct 16, 2014 at 08:53:03PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > We previously wrote a bunch of files (eth*, veth*, and bridge*) as hard > > coded > > files which we used as the names of interfaces to restore via c

Re: [lxc-devel] [PATCH 3/9] lxc_start: ERROR if container is already running.

2014-10-21 Thread Tycho Andersen
On Fri, Oct 10, 2014 at 11:16:54AM +0800, Dongsheng Yang wrote: > We should exit with a error when starting a running container. Is this intentional? I just noticed it when pulling from master that it breaks some of my scripts. Are we sure it doesn't break anything else? Tycho > Signed-off-by: D

Re: [lxc-devel] [PATCH 3/9] lxc_start: ERROR if container is already running.

2014-10-21 Thread Tycho Andersen
On Tue, Oct 21, 2014 at 02:29:28PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > On Fri, Oct 10, 2014 at 11:16:54AM +0800, Dongsheng Yang wrote: > > > We should exit with a error when starting a running container. > > > &g

Re: [lxc-devel] [PATCH 3/9] lxc_start: ERROR if container is already running.

2014-10-21 Thread Tycho Andersen
On Tue, Oct 21, 2014 at 02:54:34PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > On Tue, Oct 21, 2014 at 02:29:28PM +, Serge Hallyn wrote: > > > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > > > On Fri, Oc

[lxc-devel] [PATCH] c/r: put lxc-restore-net in /usr/share

2014-10-22 Thread Tycho Andersen
rootfs and then happliy called criu, pointing it to this directory which didn't have lxc-restore-net any more, it just had the container's rootfs. Instead, we should put lxc-restore-net somewhere else, so that criu can still see it after the rootfs is mounted. Signed-off-by: Tych

Re: [lxc-devel] [PATCH] c/r: put lxc-restore-net in /usr/share

2014-10-22 Thread Tycho Andersen
On Wed, Oct 22, 2014 at 10:25:02PM +, Tycho Andersen wrote: > On restore, we pass criu a script to manage the network interfaces (i.e. the > full path to lxc-restore-net), which we previously installed into > /var/lib//lxc. However, this is also the directory that is the default >

Re: [lxc-devel] Help building LXC from source

2014-10-31 Thread Tycho Andersen
On Fri, Oct 31, 2014 at 03:31:38PM -0700, David Richardson wrote: > Hey everyone, > > Apologies up front for a somewhat dumb question, but I'm looking to build > and install LXC from source on Ubuntu-14.04 so that I can debug some issues > I'm seeing with automounting in a container. My current s

Re: [lxc-devel] Help building LXC from source

2014-11-02 Thread Tycho Andersen
mes with its own problems :) Tycho > ~Dave > > On Fri, Oct 31, 2014 at 3:34 PM, Tycho Andersen < > tycho.ander...@canonical.com> wrote: > > > On Fri, Oct 31, 2014 at 03:31:38PM -0700, David Richardson wrote: > > > Hey everyone, > > > > > > A

[lxc-devel] lxd move specification

2014-11-06 Thread Tycho Andersen
Hi all, I have a couple questions about exactly how `lxd move` [1] would be implemented. First, is the --stateful argument necessary? Can we just drop it and make it implied if the container is running? Second, are we sure we want to support changing the hostname of a running container (lxc move

Re: [lxc-devel] lxd move specification

2014-11-11 Thread Tycho Andersen
On Thu, Nov 06, 2014 at 09:43:51AM -0500, Stéphane Graber wrote: > On Thu, Nov 06, 2014 at 03:56:05AM -0600, Tycho Andersen wrote: > > Hi all, > > > > I have a couple questions about exactly how `lxd move` [1] would be > > implemented. > > > > First, is th

Re: [lxc-devel] [PATCH 1/1] lxc_info: flush stdout before calling routines which may fork

2014-11-12 Thread Tycho Andersen
On Wed, Nov 12, 2014 at 03:51:04AM +, Serge Hallyn wrote: > Otherwise both resulting takss will print what they had flushed when they > exit. > > This fixes https://bugs.launchpad.net/bugs/1389244 > > Signed-off-by: Serge Hallyn Tested-by: Tycho Andersen Thanks!

Re: [lxc-devel] Session Leader

2015-01-09 Thread Tycho Andersen
On Fri, Jan 09, 2015 at 07:49:54PM -0600, riya khanna wrote: > Why is init not a session leader? I faced an issue with using CRIU > because of that. Adding CRIU folks as well. How did you call CRIU to do the dump? Tycho > Error (cr-dump.c:1598): A session leader of 74(1) is outside of its > pid

[lxc-devel] [PATCH] set the monitor process title to something useful

2015-01-30 Thread Tycho Andersen
Instead of having a parent process that's called whatever the caller of the library is called, we instead set it to "[lxc monitor] " Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 10 + src/lxc/utils.c| 61

Re: [lxc-devel] [PATCH] set the monitor process title to something useful

2015-01-30 Thread Tycho Andersen
On Fri, Jan 30, 2015 at 01:38:59PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Instead of having a parent process that's called whatever the caller of the > > library is called, we instead set it to "[lxc monitor] > >

[lxc-devel] [PATCH] define some macros to fix the build

2015-01-30 Thread Tycho Andersen
Not all kernels have these macros; they'll just give an EINVAL if/when invoked. Signed-off-by: Tycho Andersen --- src/lxc/utils.c | 16 1 file changed, 16 insertions(+) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 9acf7e6..f9533db 100644 --- a/src/lxc/utils.c +++

[lxc-devel] [PATCH] Process command line is null terminated

2015-02-04 Thread Tycho Andersen
It turns out the process command line is in fact null terminated on the stack; this caused a bug where when the new process title was smaller than the old one, the first environment entry would be rendered as part of the process title. Signed-off-by: Tycho Andersen --- src/lxc/utils.c | 9

[lxc-devel] [PATCH] lxc-checkpoint -r should actually wait for the restore to happen

2015-03-20 Thread Tycho Andersen
From: Tycho Andersen Signed-off-by: Tycho Andersen --- src/lxc/lxc_checkpoint.c | 20 1 file changed, 20 insertions(+) diff --git a/src/lxc/lxc_checkpoint.c b/src/lxc/lxc_checkpoint.c index cfa08fc..8345789 100644 --- a/src/lxc/lxc_checkpoint.c +++ b/src/lxc

Re: [lxc-devel] lxc-checkpoint error

2015-03-24 Thread Tycho Andersen
Hi Ruslan, On Tue, Mar 24, 2015 at 10:14:02AM +0200, Ruslan Kuprieiev wrote: > Hi Axel, > > On 03/24/2015 01:17 AM, Axel Schöner wrote: > >Am Montag, 23. März 2015, 15:42:47 schrieb Ruslan Kuprieiev: > >>Hi! > >> > >>I'm trying to use lxc-checkpoint to dump/restore simple lxc container. > >> > >>

Re: [lxc-devel] lxc-checkpoint error

2015-03-24 Thread Tycho Andersen
On Tue, Mar 24, 2015 at 04:40:00PM +0200, Ruslan Kuprieiev wrote: > Hi Tycho, > > On 03/24/2015 04:21 PM, Tycho Andersen wrote: > >Hi Ruslan, > > > >On Tue, Mar 24, 2015 at 10:14:02AM +0200, Ruslan Kuprieiev wrote: > >>Hi Axel, > >> > >>On 0

Re: [lxc-devel] lxc-checkpoint error

2015-03-24 Thread Tycho Andersen
On Tue, Mar 24, 2015 at 09:10:54PM +0200, Ruslan Kuprieiev wrote: > Hi Tycho, > > On 03/24/2015 05:00 PM, Tycho Andersen wrote: > >Yep :). For that I used utopic hosts with utopic containers with no LXCFS. > >LXC hash 0080bebf3195 is probably a good one to use. You might be a

Re: [lxc-devel] [PATCH] lxc-checkpoint -r should actually wait for the restore to happen

2015-03-24 Thread Tycho Andersen
On Fri, Mar 20, 2015 at 08:38:39PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > From: Tycho Andersen > > > > Signed-off-by: Tycho Andersen > > --- > > src/lxc/lxc_checkpoint.c | 20 &

Re: [lxc-devel] [PATCH] lxc-checkpoint -r should actually wait for the restore to happen

2015-03-24 Thread Tycho Andersen
On Tue, Mar 24, 2015 at 07:40:48PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > + if (pid != 0) > > + wait_for_pid(pid); > > Sorry - I suspect some package builds will fail on the ignore of > return value here. Cou

Re: [lxc-devel] [PATCH] lxc-checkpoint -r should actually wait for the restore to happen

2015-03-24 Thread Tycho Andersen
On Tue, Mar 24, 2015 at 08:05:17PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > On Tue, Mar 24, 2015 at 07:40:48PM +, Serge Hallyn wrote: > > > Quoting Tycho Andersen (tycho.ander...@canonical.com): > >

[lxc-devel] [PATCH] lxcapi_restore shouldn't steal the calling process

2015-03-25 Thread Tycho Andersen
calls it. Users who want to daemonize the restore process need to fork themselves. lxc-checkpoint has been updated to reflect this behavior change. Signed-off-by: Tycho Andersen --- src/lxc/lxc_checkpoint.c | 48 +++-- src/lxc/lxccontainer.c

Re: [lxc-devel] [PATCH] lxcapi_restore shouldn't steal the calling process

2015-03-26 Thread Tycho Andersen
On Wed, Mar 25, 2015 at 11:05:23AM -0600, Tycho Andersen wrote: > Previously, lxcapi_restore used the calling process as the lxc monitor process > (and just never returned), requiring users to fork before calling it. This, of > course, would cause problems for things like LXD, which c

[lxc-devel] [PATCH] lxcapi_restore shouldn't steal the calling process

2015-03-26 Thread Tycho Andersen
calls it. Users who want to daemonize the restore process need to fork themselves. lxc-checkpoint has been updated to reflect this behavior change. Signed-off-by: Tycho Andersen --- src/lxc/lxc_checkpoint.c | 48 +-- src/lxc/lxccontainer.c

[lxc-devel] [PATCH] c/r: teach criu about cgmanager's socket

2015-03-26 Thread Tycho Andersen
CRIU needs to be told when something is bind mounted into the container from the outside as cgmanager's socket is. Signed-off-by: Tycho Andersen --- src/lxc/cgfs.c | 1 + src/lxc/cgmanager.c| 1 + src/lxc/cgroup.c | 5 + src/lxc/cgroup.h | 7 +++ sr

[lxc-devel] [PATCH] c/r: tell CRIU about all external mounts in the config

2015-03-26 Thread Tycho Andersen
Signed-off-by: Tycho Andersen --- src/lxc/conf.c | 18 +++--- src/lxc/conf.h | 2 ++ src/lxc/list.h | 11 + src/lxc/lxccontainer.c | 67 +++--- 4 files changed, 85 insertions(+), 13 deletions(-) diff --git a

Re: [lxc-devel] [PATCH] lxcapi_restore shouldn't steal the calling process

2015-04-03 Thread Tycho Andersen
On Fri, Apr 03, 2015 at 04:41:01PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Previously, lxcapi_restore used the calling process as the lxc monitor > > process > > (and just never returned), requiring users to fork before call

[lxc-devel] [PATCH 2/2] Use SYSERROR instead of perror

2015-04-03 Thread Tycho Andersen
It is impolite to print stuff to stderror owned by other people, and they might miss it anyway since it's not in the normal log location. Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sr

[lxc-devel] [PATCH 1/2] don't hang on some errors in do_restore

2015-04-03 Thread Tycho Andersen
Instead, the parent always writes a status to the pipe. Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index b310a0f..88cdf55 100644 --- a/src/lxc

Re: [lxc-devel] [PATCH] c/r: tell CRIU about all external mounts in the config

2015-04-03 Thread Tycho Andersen
On Fri, Apr 03, 2015 at 09:41:03PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Signed-off-by: Tycho Andersen > > --- > > src/lxc/conf.c | 18 +++--- > > src/lxc/conf.h | 2 ++ > > src/lxc/list.

Re: [lxc-devel] [PATCH] lxcapi_restore shouldn't steal the calling process

2015-04-06 Thread Tycho Andersen
On Mon, Apr 06, 2015 at 12:03:55PM -0400, Stéphane Graber wrote: > On Fri, Apr 03, 2015 at 11:02:11AM -0600, Tycho Andersen wrote: > > On Fri, Apr 03, 2015 at 04:41:01PM +, Serge Hallyn wrote: > > > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > > > P

Re: [lxc-devel] [PATCH] c/r: tell CRIU about all external mounts in the config

2015-04-06 Thread Tycho Andersen
On Mon, Apr 06, 2015 at 12:09:28PM -0400, Stéphane Graber wrote: > I'm not seeing an ack in this thread, are we expecting a new version of this? Yep, here it is. Tycho >From fadafa4348e00cd0391a8facb939510c196fc46f Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Thu, 26 Mar 20

[lxc-devel] fixes for bugs reported by coverity scan

2015-04-13 Thread Tycho Andersen
Hi all, Here's a series that fixes several nits reported by Coverity Scan. Tycho ___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel

[lxc-devel] [PATCH 2/6] c/r: no double fclose() of mnts

2015-04-13 Thread Tycho Andersen
Reported-by: Coverity Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 3c3ff33..6a2b080 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -3895,6 +3895,7 @@ static

[lxc-devel] [PATCH 4/6] fix dead code

2015-04-13 Thread Tycho Andersen
We've already checked that c is not null above, so the false branch can never be taken here. Reported-by: Coverity Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c

[lxc-devel] [PATCH 1/6] fix integer overflow in setproctitle

2015-04-13 Thread Tycho Andersen
1. prctl() only accepts longs, so we can just scan the stat file as longs. 2. check overflow before addition Signed-off-by: Tycho Andersen --- src/lxc/utils.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 1df6e8f

[lxc-devel] [PATCH 5/6] mount: use mkstemp instead of tmpnam

2015-04-13 Thread Tycho Andersen
Reported-by: Coverity Signed-off-by: Tycho Andersen --- src/lxc/conf.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index f1e89d8..e4222eb 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2053,16 +2053,30

[lxc-devel] [PATCH 6/6] c/r: use mkstemp to get a pidfile name

2015-04-13 Thread Tycho Andersen
This is more secure than tempnam(). Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 30 +++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 5b96b8c..8424cf6 100644 --- a/src/lxc

[lxc-devel] [PATCH 3/6] fix NULL dereference

2015-04-13 Thread Tycho Andersen
lxc_console dereferences C, so we should check that it is not null and fail if it is. Reported-by: Coverity Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index

[lxc-devel] [PATCH] c/r: rework external mountpoint handling v2

2015-04-13 Thread Tycho Andersen
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. Signed-off-by: Tycho Andersen --- src/lxc/lxcc

[lxc-devel] [PATCH] c/r: use criu option instead of lxc-restore-net

2015-04-13 Thread Tycho Andersen
probably want to wait to use 1.5 options until it has been out for a while and is in distros. Signed-off-by: Tycho Andersen --- src/lxc/Makefile.am | 4 src/lxc/lxc-restore-net | 26 -- src/lxc/lxccontainer.c | 37 + 3 files changed

Re: [lxc-devel] [PATCH 5/6] mount: use mkstemp instead of tmpnam

2015-04-13 Thread Tycho Andersen
On Mon, Apr 13, 2015 at 07:18:21PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Reported-by: Coverity > > Signed-off-by: Tycho Andersen > > --- > > src/lxc/conf.c | 22 ++ > > 1 file chang

Re: [lxc-devel] [PATCH 1/6] fix integer overflow in setproctitle

2015-04-13 Thread Tycho Andersen
On Mon, Apr 13, 2015 at 07:05:24PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > 1. prctl() only accepts longs, so we can just scan the stat file as longs. > > ? That's not what the manpage tells me. Hmm, yeah, I must be crazy.

[lxc-devel] [PATCH 1/6] fix integer overflow in setproctitle

2015-04-13 Thread Tycho Andersen
1. don't cast to long 2. check overflow before addition v2: just remove the cast, don't change the type of the variables Reported-by: Coverity Signed-off-by: Tycho Andersen --- src/lxc/utils.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lxc

Re: [lxc-devel] [PATCH 6/6] c/r: use mkstemp to get a pidfile name

2015-04-13 Thread Tycho Andersen
On Mon, Apr 13, 2015 at 04:52:37PM -0500, Stéphane Graber wrote: > On Mon, Apr 13, 2015 at 06:07:05PM +0000, Tycho Andersen wrote: > > This is more secure than tempnam(). > > No such thing as mkstemp on Android unfortunately. Yep, sorry. I think we can drop both the temp file p

[lxc-devel] [PATCH] don't compare unsigned values as negative ones

2015-04-13 Thread Tycho Andersen
Instead, check that the result is larger than its parts. Signed-off-by: Tycho Andersen --- src/lxc/utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 084b556..fe71e9a 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c

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

2015-04-14 Thread Tycho Andersen
does Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 90 +++--- 1 file changed, 20 insertions(+), 70 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 3c3ff33..db11947 100644 --- a/src/lxc/lxccontainer.

Re: [lxc-devel] [PATCH] c/r: rework external mountpoint handling v2

2015-04-15 Thread Tycho Andersen
On Wed, Apr 15, 2015 at 03:48:10PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > CRIU now supports autodetection of external mounts via the --ext-mount-map > > auto > > --enable-external-sharing --enable-external-masters options,

Re: [lxc-devel] [PATCH 1/2] c/r: rework external mountpoint handling v3

2015-04-15 Thread Tycho Andersen
On Wed, Apr 15, 2015 at 03:57:32PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > CRIU now supports autodetection of external mounts via the --ext-mount-map > > auto > > --enable-external-sharing --enable-external-masters options,

Re: [lxc-devel] [PATCH] c/r: rework external mountpoint handling v2

2015-04-15 Thread Tycho Andersen
On Wed, Apr 15, 2015 at 04:19:54PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > On Wed, Apr 15, 2015 at 03:48:10PM +, Serge Hallyn wrote: > > > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > > > CRIU now supp

Re: [lxc-devel] [PATCH] c/r: rework external mountpoint handling v2

2015-04-15 Thread Tycho Andersen
On Wed, Apr 15, 2015 at 04:39:10PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > On Wed, Apr 15, 2015 at 04:19:54PM +, Serge Hallyn wrote: > > > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > > > On Wed, Ap

[lxc-devel] [PATCH 1/2] c/r: rework external mountpoint handling v4

2015-04-15 Thread Tycho Andersen
rt does v4: rebase onto master for revert of logging patch Signed-off-by: Tycho Andersen Acked-by: Serge E. Hallyn --- src/lxc/lxccontainer.c | 91 +++--- 1 file changed, 20 insertions(+), 71 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc

[lxc-devel] [PATCH 2/2] c/r: check version of criu

2015-04-16 Thread Tycho Andersen
Note that we allow both a tagged version or a git build that has sufficient patches for the features we require. Signed-off-by: Tycho Andersen --- src/lxc/criu.c | 89 ++ 1 file changed, 89 insertions(+) diff --git a/src/lxc/criu.c b/src

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

2015-04-16 Thread Tycho Andersen
Trying to cage the beast that is lxccontainer.c. Signed-off-by: Tycho Andersen --- src/lxc/Makefile.am| 4 +- src/lxc/criu.c | 477 + src/lxc/criu.h | 70 src/lxc/lxccontainer.c | 454

Re: [lxc-devel] [PATCH 2/2] c/r: check version of criu

2015-04-17 Thread Tycho Andersen
On Fri, Apr 17, 2015 at 04:28:33PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Note that we allow both a tagged version or a git build that has sufficient > > patches for the features we require. > > > > Signed-off-by: Ty

[lxc-devel] [PATCH] c/r: check version of criu

2015-04-20 Thread Tycho Andersen
Note that we allow both a tagged version or a git build that has sufficient patches for the features we require. v2: close criu's stderr too Signed-off-by: Tycho Andersen Acked-by: Serge E. Hallyn --- src/lxc/criu.c | 90 ++ 1

  1   2   >