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

2020-12-04 Thread Tycho Andersen
mands_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/92bc70903c8e9ca920503bcf288934a9e8f

Re: [lxc-devel] LXC snapshot using overlayfs fsfreeze

2017-05-02 Thread Tycho Andersen
Hi Amir, On Tue, Apr 11, 2017 at 01:37:53PM +0300, Amir Goldstein wrote: > On Mon, Apr 10, 2017 at 5:20 PM, Tycho Andersen <ty...@docker.com> wrote: > > Hi Amir, > > > > On Sat, Apr 08, 2017 at 09:35:01PM +0200, Amir Goldstein wrote: > >> [moving this discus

Re: [lxc-devel] LXC snapshot using overlayfs fsfreeze

2017-05-02 Thread Tycho Andersen
Hi Amir, On Sat, Apr 08, 2017 at 09:35:01PM +0200, Amir Goldstein wrote: > [moving this discussion over from fsdevel to containers list and > changing the title] > > On Tue, Apr 4, 2017 at 9:07 PM, Tycho Andersen <ty...@docker.com> wrote: > > On Tue, Apr 04, 2017 a

Re: [lxc-devel] LXD live migration fail, help

2016-03-04 Thread Tycho Andersen
Hi, On Fri, Mar 04, 2016 at 10:31:11AM +0900, 디케이 wrote: > I failed simple live migration 2.0.0.0 beta4. > so I installed source code, now LXD version is* 2.0.0.rc1.* > > I create a one container (name: psychosomatic-joella) and apply profile > 'migratable' to container > and copy profile to

Re: [lxc-devel] [PATCH] c/r: remember to chown the cgroup path (correctly)

2016-01-14 Thread Tycho Andersen
On Wed, Jan 13, 2016 at 09:47:50PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > 1. remember to chown the cgroup path when migrating a container > > 2. when restoring the cgroup path, try to compute the euid for root vs. > >usi

Re: [lxc-devel] [PATCH] .gitignore: add sparclinux make output

2016-01-14 Thread Tycho Andersen
On Wed, Jan 13, 2016 at 10:20:12PM +, Serge Hallyn wrote: > Quoting Wim Coekaerts (wim.coekae...@oracle.com): > > On 1/13/16 1:50 PM, Serge Hallyn wrote: > > >Quoting Tycho Andersen (tycho.ander...@canonical.com): > > >>Signed-off-by: Tycho Andersen <tycho.a

Re: [lxc-devel] [PATCH] c/r: remember to chown the cgroup path (correctly)

2016-01-14 Thread Tycho Andersen
On Thu, Jan 14, 2016 at 09:28:07AM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > On Wed, Jan 13, 2016 at 09:47:50PM +, Serge Hallyn wrote: > > > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > > > 1. remember

[lxc-devel] [PATCH] .gitignore: add sparclinux make output

2016-01-13 Thread Tycho Andersen
Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5e4912c..58e5dea 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ templates/lxc-opensuse templates/lxc-oracle templat

[lxc-devel] [PATCH] c/r: remember to chown the cgroup path (correctly)

2016-01-13 Thread Tycho Andersen
1. remember to chown the cgroup path when migrating a container 2. when restoring the cgroup path, try to compute the euid for root vs. using geteuid(); geteuid works for start, but it doesn't work for migration since we're still real root at that point. Signed-off-by: Tycho Andersen

[lxc-devel] [PATCH] cgmanager: don't make tasks + cgroup.procs +x

2016-01-13 Thread Tycho Andersen
No reason for these to be +x, and it looks weird. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/cgmanager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/cgmanager.c b/src/lxc/cgmanager.c index 5596285..357182a 100644 --- a/s

Re: [lxc-devel] On the road to LXC 2.0.0

2015-12-23 Thread Tycho Andersen
On Mon, Dec 21, 2015 at 05:12:12PM -0500, Stéphane Graber wrote: > Hey everyone, > > So you may have noticed I just tagged LXC 2.0.0 beta1. > > The current plan is as follow: > - LXC 2.0.0 beta2 next week (28th) > - LXC 2.0.0 rc1 the week after (4th) Can we potentially push this back? I don't

[lxc-devel] [PATCH 1/2] c/r: use --lsm-profile if provided

2015-12-11 Thread Tycho Andersen
(that criu has saved) won't exist on the new host. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 5ca4f9f..c30fa33 100644 --- a/src/lxc/

[lxc-devel] [PATCH 2/2] c/r: bump criu patchlevel for --lsm-profile

2015-12-11 Thread Tycho Andersen
This option is only available in recent master of criu, so let's require that since we're using it. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/criu.h b/src/lxc/criu.h

Re: [lxc-devel] [PATCH 1/3] cgroup: add cgroup_escape() call

2015-12-09 Thread Tycho Andersen
On Wed, Dec 09, 2015 at 02:58:20AM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > + bool ret = true, cgm_connected = false; > > Sorry, can you rename this disconnect_cgm or cgm_needs_disconnect ? Sure, see attache

[lxc-devel] [PATCH 1/3] cgroup: add cgroup_escape() call

2015-12-08 Thread Tycho Andersen
We'll use this in the next patch to escape to the root cgroup before we exec criu. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/cgfs.c | 50 ++ src/lxc/cgmanager.c | 19 --- src/lxc/cgroup.c

[lxc-devel] [PATCH 3/3] c/r: add more logging when restore fails

2015-12-08 Thread Tycho Andersen
Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 062289f..da909a9 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -525,6 +525,7 @@ void do_r

Re: [lxc-devel] [PATCH 1/3] cgroup: add cgroup_escape() call

2015-12-08 Thread Tycho Andersen
On Tue, Dec 08, 2015 at 04:08:09PM -0700, Tycho Andersen wrote: > Whoops, forgot the --compose flag. I should mention that this is on top of my already sent patches about adding the ->migrate API call. It probably doesn't matter except for patch 3, and even that git can probably figu

[lxc-devel] [PATCH] c/r: remove random line continuations

2015-12-07 Thread Tycho Andersen
No idea how these got there, but let's get rid of them since they're weird. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 695a763..a0c3a16

[lxc-devel] [PATCH 3/3] c/r: add a new ->migrate API call

2015-12-02 Thread Tycho Andersen
r failure handling on restore). Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.c | 155 +++-- src/lxc/criu.h | 9 ++- src/lxc/lxccontainer.c | 140 src/lxc

[lxc-devel] [PATCH 2/3] c/r: bump criu version requirements

2015-12-02 Thread Tycho Andersen
Since we're relying on 1.8 for the seccomp stuff, let's refuse to use anything lower than that. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/criu.h b/src/lxc/criu.h index d

[lxc-devel] [PATCH 1/3] api wrapper: only reset the current config if this call set it

2015-12-02 Thread Tycho Andersen
Instead of *always* resetting the current_config to null, we should only reset it if this API call set it. This allows nesting of API calls, e.g. c->checkpoint() can pass stuff into criu.c, which can call c->init_pid() and not lose the ability to log stuff afterwards. Signed-off-by:

[lxc-devel] a new API for c/r for lxc 2.0

2015-12-02 Thread Tycho Andersen
Hi all, Here's a new, hopefully more extensible, API for doing checkpoint/restore (and related) operations on a container. There are a few things landing soon in CRIU that I'd like to integrate, but I haven't specified them yet because they're not landed, and also because it will be a good test

Re: [lxc-devel] [PATCH 3/3] c/r: add a new ->migrate API call

2015-12-02 Thread Tycho Andersen
On Wed, Dec 02, 2015 at 02:30:54PM -0700, Tycho Andersen wrote: > This patch adds a new ->migrate API call with three commands: Derp, here's a new version with a small but obvious bug fixed. Tycho >From 9c4c750b9305ee81e11fa399057d6f8d1d7eb1e2 Mon Sep 17 00:00:00 2001 From: Tycho

[lxc-devel] [PATCH] log: use the right size for timestamp formatting

2015-12-01 Thread Tycho Andersen
Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/confile.c | 2 ++ src/lxc/criu.c| 7 ++- src/lxc/log.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index c2eaaa6..9ed9e38 100644 --- a/s

Re: [lxc-devel] [PATCH] log: use the right size for timestamp formatting

2015-12-01 Thread Tycho Andersen
On Tue, Dec 01, 2015 at 08:58:26AM -0700, Tycho Andersen wrote: > Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> Ah, derp. Some other random debug crap got in here. Here's a better patch. Tycho >From 0f65015bed38b2dc03d1245a4e82afff5a01c426 Mon Sep 17 00:00:00 2001

[lxc-devel] [PATCH] c/r: tell CRIU about cgproxy sockets

2015-11-17 Thread Tycho Andersen
will fail and cgproxy will probably give some weird errors. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.c | 97 +- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/src/lxc/criu.c b/src/lxc/criu

Re: [lxc-devel] [PATCH] c/r: tell CRIU about cgproxy sockets

2015-11-17 Thread Tycho Andersen
On Tue, Nov 17, 2015 at 01:13:40PM -0700, Tycho Andersen wrote: > CRIU needs to be told about connections to "external" sockets (in > particular, that it is ok to dump containers with connections to these > sockets). Since cgproxy connects to the bind mounted socket provided b

[lxc-devel] [PATCH] get rid of fancy proctitles

2015-11-16 Thread Tycho Andersen
It turns out clobbering the environ kernel stack does actually affect the kernel environment (viz [1]), regardless of what previous behavior or man pages said. For the 1.1 series, we should simply not try to clobber proctitles. [1]: http://paste.ubuntu.com/13300018/ Signed-off-by: Tycho Andersen

[lxc-devel] [PATCH] don't truncate environment sometimes in setproctitle

2015-11-16 Thread Tycho Andersen
Instead, let's just allocate new space for the proctitle to live and point the kernel at that. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/lxccontainer.c | 2 +- src/lxc/utils.c| 29 + 2 files changed, 10 insertions(

[lxc-devel] [PATCH v2] don't truncate environment sometimes in setproctitle

2015-11-16 Thread Tycho Andersen
Instead, let's just allocate new space for the proctitle to live and point the kernel at that. v2: take out testing hunk Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/utils.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-)

[lxc-devel] [PATCH v3] don't truncate environment sometimes in setproctitle

2015-11-16 Thread Tycho Andersen
Instead, let's just allocate new space for the proctitle to live and point the kernel at that. v2: take out testing hunk v3: check return from realloc Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> Acked-by: Serge E. Hallyn <serge.hal...@ubuntu.com> --- src/lxc/

Re: [lxc-devel] [PATCH] get rid of fancy proctitles

2015-11-16 Thread Tycho Andersen
n drop this one for now, there may be a better way. Thanks, Tycho > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > It turns out clobbering the environ kernel stack does actually affect the > > kernel environment (viz [1]), regardless of what previous behavior or man >

[lxc-devel] [PATCH] utils: dialback setproctitle failure message

2015-11-09 Thread Tycho Andersen
This isn't in any way fatal, so let's only warn about it with INFO, not ERROR. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index d9e769d..dac6418

[lxc-devel] [PATCH] c/r: use freezer to seize tasks

2015-11-06 Thread Tycho Andersen
in criu 1.7, so it should only go into master. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 7ee6cbe..695a763 100644 --- a/s

[lxc-devel] [PATCH] use PR_SET_MM_MAP instead of PR_SET_MM

2015-11-06 Thread Tycho Andersen
be as pretty. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/utils.c | 69 +++-- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 01774c0..fc6bb41 100644 --- a/s

[lxc-devel] [PATCH v2] use PR_SET_MM_MAP instead of PR_SET_MM

2015-11-06 Thread Tycho Andersen
be as pretty. v2: remember to chop off bits of the string that are too long Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/utils.c | 70 +++-- 1 file changed, 58 insertions(+), 12 deletions(-) diff --git a/s

[lxc-devel] [PATCH] c/r: don't require a veth link to c/r

2015-11-06 Thread Tycho Andersen
veths can be unconnected in the container's config, and we should handle this case. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 798036a..7

[lxc-devel] [PATCH] define PR_SET_MM_MAP & friends if necessary

2015-11-06 Thread Tycho Andersen
in 93525c00c76b2804c46cf3c275d610ebe71cb4be. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/utils.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index d592243..d9e769d 100644 --- a/src/lxc/utils.c +++ b/s

Re: [lxc-devel] odd freezer cgroup behavior

2015-10-29 Thread Tycho Andersen
On Wed, Oct 28, 2015 at 11:55:32AM +0100, Christian Brauner wrote: > On Wed, Oct 28, 2015 at 04:08:09PM +0900, Tycho Andersen wrote: > > Hi all, > > > > I'm seeing some (what seems to me to be) odd behavior, where only a > > task's init process is in its freezer cgroup

[lxc-devel] odd freezer cgroup behavior

2015-10-28 Thread Tycho Andersen
Hi all, I'm seeing some (what seems to me to be) odd behavior, where only a task's init process is in its freezer cgroup: firedrill:~ sudo lxc-info -n proposed Name: proposed State: RUNNING PID:10959 IP: 10.0.3.176 IP: 10.0.4.1 CPU use:

[lxc-devel] [PATCH] cmds: fix abstract socket length problem

2015-09-25 Thread Tycho Andersen
Since we want to use null-terminated abstract sockets, let's compute the length of them correctly. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/commands.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lxc/commands.c b/s

Re: [lxc-devel] [PATCH 1/3] lxc-checkconfig: add some more config options

2015-09-14 Thread Tycho Andersen
On Mon, Sep 14, 2015 at 02:17:03PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Here's some more config options that we do actually require to be able to > > boot containers. > > > > Signed-off-by: Tycho Andersen <tycho.ande

[lxc-devel] [PATCH 3/3] gitignore: add strange lxc@.service file

2015-09-11 Thread Tycho Andersen
I have no idea what this file is, but the build system seems to be generating it, so let's ignore it. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9c60c92..5ec52c5

[lxc-devel] [PATCH 1/3] lxc-checkconfig: add some more config options

2015-09-11 Thread Tycho Andersen
Here's some more config options that we do actually require to be able to boot containers. Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/lxc-checkconfig.in | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/lxc/lxc-checkconfig.in b/src/l

[lxc-devel] [PATCH 2/3] gitignore: add Korean man page output

2015-09-11 Thread Tycho Andersen
Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 35d89f2..9c60c92 100644 --- a/.gitignore +++ b/.gitignore @@ -135,6 +135,9 @@ doc/ja/*.5 doc/ja/*.7 doc/ja/legacy/*.1 doc/lega

[lxc-devel] [PATCH] c/r: enable tracefs

2015-08-14 Thread Tycho Andersen
tracefs is a new filesystem that can be mounted by users. Only the options and fs name need to be passed to restore the state, so we can use criu's auto fs feature. Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/criu.c | 6 -- 1 file changed, 4 insertions(+), 2

Re: [lxc-devel] [PATCH 2/3] c/r: get rid of dump_net_info()

2015-08-13 Thread Tycho Andersen
On Wed, Aug 12, 2015 at 04:20:29PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): On Wed, Aug 12, 2015 at 03:28:07PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): On Wed, Aug 12, 2015 at 03:09:22PM +, Serge Hallyn

Re: [lxc-devel] [PATCH 3/3] c/r: allow empty networks to be checkpointed/restored

2015-08-12 Thread Tycho Andersen
On Wed, Aug 12, 2015 at 03:05:19PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): Empty networks don't have anything (besides lo) for us to dump and restore, so we should allow these as well. Reported-by: Dietmar Maurer diet...@proxmox.com Signed-off

Re: [lxc-devel] [PATCH 2/3] c/r: get rid of dump_net_info()

2015-08-12 Thread Tycho Andersen
On Wed, Aug 12, 2015 at 03:09:22PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): On Wed, Aug 12, 2015 at 02:54:14PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): This was originally used to propagate the bridge

Re: [lxc-devel] [PATCH 2/3] c/r: get rid of dump_net_info()

2015-08-12 Thread Tycho Andersen
On Wed, Aug 12, 2015 at 02:54:14PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): This was originally used to propagate the bridge and veth names across hosts, but now we extract both from the container's config file, and Is that the right thing to do? I

Re: [lxc-devel] [PATCH 2/3] c/r: get rid of dump_net_info()

2015-08-12 Thread Tycho Andersen
On Wed, Aug 12, 2015 at 03:28:07PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): On Wed, Aug 12, 2015 at 03:09:22PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): On Wed, Aug 12, 2015 at 02:54:14PM +, Serge Hallyn

[lxc-devel] [PATCH 1/3] gitignore: add TAGS files

2015-08-10 Thread Tycho Andersen
Somehow our `make tags` target generates TAGS and not tags, so let's ignore that too. Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3cb5bfb..35d89f2 100644 --- a/.gitignore +++ b

[lxc-devel] [PATCH 3/3] c/r: allow empty networks to be checkpointed/restored

2015-08-10 Thread Tycho Andersen
Empty networks don't have anything (besides lo) for us to dump and restore, so we should allow these as well. Reported-by: Dietmar Maurer diet...@proxmox.com Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/criu.c | 14 +- 1 file changed, 13 insertions(+), 1

Re: [lxc-devel] [PATCH] lxc-checkpoint: add pre-checkpoint

2015-06-30 Thread Tycho Andersen
Hey Ruslan, On Fri, Jun 26, 2015 at 11:24:32AM +0300, Ruslan Kuprieiev wrote: Drop this one, please. I'm assuming you're probably going to send another version at some point, a question below. diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h index d60e19a..1faded2 100644 ---

Re: [lxc-devel] [PATCH] lxc-checkpoint: add pre-checkpoint

2015-06-30 Thread Tycho Andersen
On Tue, Jun 30, 2015 at 05:09:40PM +0300, Ruslan Kuprieiev wrote: Hi Tycho, On 06/30/2015 04:50 PM, Tycho Andersen wrote: Hey Ruslan, On Fri, Jun 26, 2015 at 11:24:32AM +0300, Ruslan Kuprieiev wrote: Drop this one, please. I'm assuming you're probably going to send another version

Re: [lxc-devel] live migrate and /dev/lxd

2015-06-22 Thread Tycho Andersen
On Mon, Jun 22, 2015 at 06:41:16AM +0200, Dietmar Maurer wrote: On dump, this would probably just be having the plugin query LXD to make sure that all requests for the container were flushed so that CRIU would at least dump the socket buffers for the kernel. On restore, the plugin would

Re: [lxc-devel] live migrate and /dev/lxd

2015-06-21 Thread Tycho Andersen
Hi Dietmar, On Sat, Jun 20, 2015 at 05:45:51PM +0200, Dietmar Maurer wrote: Hi all, I just detected the /dev/lxd specification: https://github.com/lxc/lxd/blob/master/specs/dev-lxd.md and saw that event API: --- /1.0/events GET Description: event interface

Re: [lxc-devel] [PATCH] daemonized start: exit children on failure, don't return

2015-06-12 Thread Tycho Andersen
a second instance of the calling function. Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com Acked-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/lxccontainer.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc

Re: [lxc-devel] [PATCH v3 4/4] uniformly nullify std fds

2015-06-10 Thread Tycho Andersen
On Wed, Jun 10, 2015 at 12:03:08PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): In various places throughout the code, we want to nullify the std fds, opening them to /dev/null or zero or so. Instead, let's unify this code and do it in such a way

[lxc-devel] [PATCH 4/4] uniformly nullify std fds

2015-06-10 Thread Tycho Andersen
v4: axe comment, check errors on dup2, s/quiet/need_null_stdfds Reported-by: Coverity Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/bdev.c | 8 ++-- src/lxc/lxccontainer.c | 21 +++-- src/lxc/monitor.c | 8 ++-- src/lxc/start.c

Re: [lxc-devel] [PATCH 4/4] uniformly nullify std fds

2015-06-09 Thread Tycho Andersen
On Tue, Jun 09, 2015 at 11:48:05AM +0200, Robert Vogelgesang wrote: Hi, On Mon, Jun 08, 2015 at 07:59:54PM -0600, Tycho Andersen wrote: In various places throughout the code, we want to nullify the std fds, opening them to /dev/null or zero or so. Instead, let's unify this code and do

[lxc-devel] [PATCH v3 4/4] uniformly nullify std fds

2015-06-09 Thread Tycho Andersen
Reported-by: Coverity Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/bdev.c | 8 ++-- src/lxc/lxccontainer.c | 24 +++- src/lxc/monitor.c | 8 ++-- src/lxc/start.c| 10 ++ src/lxc/utils.c| 16

Re: [lxc-devel] [PATCH v2 4/4] uniformly nullify std fds

2015-06-09 Thread Tycho Andersen
On Tue, Jun 09, 2015 at 10:04:21AM -0600, Tycho Andersen wrote: In various places throughout the code, we want to nullify the std fds, opening them to /dev/null or zero or so. Instead, let's unify this code and do it in such a way that Coverity (probably) won't complain. v2: use /dev/null

Re: [lxc-devel] [PATCH v3 4/4] uniformly nullify std fds

2015-06-09 Thread Tycho Andersen
On Tue, Jun 09, 2015 at 07:51:07PM +0200, Robert Vogelgesang wrote: Hi Tycho, thank you for the updated patch, but you missed my intention, see below. On Tue, Jun 09, 2015 at 10:09:28AM -0600, Tycho Andersen wrote: In various places throughout the code, we want to nullify the std fds

[lxc-devel] [PATCH 3/4] move utils.h #endif to end of file

2015-06-08 Thread Tycho Andersen
Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/utils.h b/src/lxc/utils.h index e9e07d9..6bd05e0 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -268,7 +268,6 @@ extern bool dir_exists

[lxc-devel] [PATCH 4/4] uniformly nullify std fds

2015-06-08 Thread Tycho Andersen
In various places throughout the code, we want to nullify the std fds, opening them to /dev/null or zero or so. Instead, let's unify this code and do it in such a way that Coverity (probably) won't complain. Reported-by: Coverity Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src

[lxc-devel] [PATCH 1/4] c/r: use fclose instead of close

2015-06-08 Thread Tycho Andersen
We're leaking the FILE* here while closing the underlying fd; let's just close the file and thus close both. Reported-by: Coverity Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/criu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/criu.c

[lxc-devel] [PATCH 2/4] c/r: remove unused variable mnts

2015-06-08 Thread Tycho Andersen
Reported-by: Coverity Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/criu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index adcc626..e939b37 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -54,7 +54,6 @@ void exec_criu(struct

Re: [lxc-devel] hardcoded criu path?

2015-06-03 Thread Tycho Andersen
On Wed, Jun 03, 2015 at 06:28:12AM +0200, Dietmar Maurer wrote: in criu.c, line 232: execv(/usr/local/sbin/criu, args); Heh. Whoops. I'll send a patch for that ASAP. Tycho this fails on my system because criu is installed in /usr/sbin.

[lxc-devel] [PATCH] don't hardcode the path to criu when checking versions

2015-06-03 Thread Tycho Andersen
We use the right path when actually execing criu to checkpoint and restore, but when checking versions we didn't. Let's use the right path. Reported-by: Dietmar Maurer diet...@proxmox.com Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/criu.c | 4 +++- 1 file changed, 3

[lxc-devel] [PATCH] c/r: complain when criu isn't exec()'d correctly

2015-05-06 Thread Tycho Andersen
Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/criu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 1913473..5fbe7cb 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -239,6 +239,7 @@ static bool criu_version_ok

[lxc-devel] [PATCH] c/r: check for criu images in the checkpoint directory

2015-04-24 Thread Tycho Andersen
if someone rsyncs some bad images over the top of the good ones). Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/lxccontainer.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index dbcee99..8999f44 100644

Re: [lxc-devel] [PATCH] c/r: force users to provide a fresh directory for criu images

2015-04-23 Thread Tycho Andersen
On Wed, Apr 22, 2015 at 10:26:17PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): On Wed, Apr 22, 2015 at 01:16:08PM -0600, Tycho Andersen wrote: CRIU can get confused if more than one c/r is done in the same directory, so we should require lxcapi so

Re: [lxc-devel] [PATCH] c/r: force users to provide a fresh directory for criu images

2015-04-22 Thread Tycho Andersen
On Wed, Apr 22, 2015 at 01:16:08PM -0600, Tycho Andersen wrote: CRIU can get confused if more than one c/r is done in the same directory, so we should require lxcapi so that it refuses to dump to a directory with criu images already in it. Hmm, actually I'm not sure this is the best way

[lxc-devel] [PATCH] c/r: force users to provide a fresh directory for criu images

2015-04-22 Thread Tycho Andersen
-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/lxccontainer.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index dbcee99..4a290f1 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -3687,8

Re: [lxc-devel] [PATCH 2/2] c/r: re-open fds after clone()

2015-04-21 Thread Tycho Andersen
On Tue, Apr 21, 2015 at 03:18:16PM +, Serge Hallyn wrote: Quoting Tycho Andersen (tycho.ander...@canonical.com): If we don't re-open these after clone, the init process has a pointer to the parent's /dev/{zero,null}. CRIU seese these and wants to dump the parent's mount namespace, which

[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 tycho.ander...@canonical.com Acked-by: Serge E. Hallyn serge.hal...@ubuntu.com --- src/lxc/criu.c | 90

[lxc-devel] [PATCH 1/2] c/r: enable hugetlbfs in criu

2015-04-20 Thread Tycho Andersen
In vivid containers hugetlbfs is mounted, but it is not one of the hardcoded fses in criu, so we need to tell criu that it is okay to automount it. Signed-off-by: Tycho Andersen tycho.ander...@canonical.com --- src/lxc/criu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[lxc-devel] c/r: support for systemd-based guests

2015-04-20 Thread Tycho Andersen
Hi all, Here are some patches we need to support dumping systemd based guests. There will be more patches coming and things still don't work yet, but we definitely need at least these. Tycho ___ lxc-devel mailing list

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: Tycho Andersen tycho.ander...@canonical.com

[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 tycho.ander...@canonical.com --- src/lxc/criu.c | 89 ++ 1 file changed, 89 insertions(+) diff

[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 tycho.ander...@canonical.com --- src/lxc/Makefile.am| 4 +- src/lxc/criu.c | 477 + src/lxc/criu.h | 70 src/lxc/lxccontainer.c | 454

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, so we don't need

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, so we don't need

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 supports autodetection of external mounts via

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

2015-04-14 Thread Tycho Andersen
-off-by: Tycho Andersen tycho.ander...@canonical.com --- 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

[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 tycho.ander...@canonical.com --- src/lxc/lxccontainer.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxccontainer.c b/src

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. I'm not sure why the casts

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

2015-04-13 Thread Tycho Andersen
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 tycho.ander...@canonical.com --- src/lxc/lxccontainer.c | 89

[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 tycho.ander...@canonical.com --- src/lxc/Makefile.am | 4 src/lxc/lxc-restore-net | 26 -- src/lxc/lxccontainer.c | 37

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 tycho.ander...@canonical.com --- src/lxc/conf.c | 22 ++ 1 file changed, 18 insertions(+), 4

[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 tycho.ander...@canonical.com --- src/lxc/utils.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions

[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 tycho.ander...@canonical.com --- 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

[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 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 tycho.ander...@canonical.com --- src/lxc/lxccontainer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxccontainer.c b

[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 tycho.ander...@canonical.com --- src/lxc/utils.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/lxc/utils.c b

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 tycho.ander...@canonical.com Date

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 calling it. This, of course

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 tycho.ander...@canonical.com --- src/lxc/conf.c | 18 +++--- src/lxc/conf.h | 2 ++ src/lxc/list.h | 11

[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 tycho.ander...@canonical.com --- 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

  1   2   >