[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

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 wrote: > > Hi Amir, > > > > On Sat, Apr 08, 2017 at 09:35:01PM +0200, Amir Goldstein wrote: > >> [moving this discussion over from

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 wrote: > > On Tue, Apr 04, 2017 at 09:59:16PM +0300, Amir Goldst

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 rem

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

2016-01-15 Thread Tycho Andersen
On Thu, Jan 14, 2016 at 07:43:20PM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > On Thu, Jan 14, 2016 at 09:28:07AM +, Serge Hallyn wrote: > > > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > > > On Wed, Ja

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

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

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

2016-01-13 Thread Tycho Andersen
Signed-off-by: Tycho Andersen --- .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 templates/lxc-plamo templates/lxc-slackware

[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: Tych

[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 --- 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/src/lxc/cgmanager.c +++ b/src/lxc

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 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 --- 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 b7d241b..e35f98a 100644

[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 --- 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/criu.c +++ b/src/lxc/criu.

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

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 2/3] c/r: escape cgroups before exec()ing criu

2015-12-08 Thread Tycho Andersen
Signed-off-by: Tycho Andersen --- src/lxc/criu.c | 12 1 file changed, 12 insertions(+) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index c0ce965..062289f 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -56,6 +56,18 @@ void exec_criu(struct criu_opts *opts) char buf

[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 --- src/lxc/cgfs.c | 50 ++ src/lxc/cgmanager.c | 19 --- src/lxc/cgroup.c| 7 +++ src/lxc/cgr

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

2015-12-08 Thread Tycho Andersen
Signed-off-by: Tycho Andersen --- 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_restore(struct lxc_container *c, int pipe

[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 --- 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 100644 --- a/src/lxc/criu.c +++

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 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] [PATCH 3/3] c/r: add a new ->migrate API call

2015-12-02 Thread Tycho Andersen
lly smarter failure handling on restore). Signed-off-by: Tycho Andersen --- src/lxc/criu.c | 155 +++-- src/lxc/criu.h | 9 ++- src/lxc/lxccontainer.c | 140 src/lxc/lxccontainer.h | 33 +

[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 --- 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 df63625..9714d17 100644 ---

[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 as

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 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 From: Tycho Andersen Date: Tue, 1

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

2015-12-01 Thread Tycho Andersen
Signed-off-by: Tycho Andersen --- 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/src/lxc/confile.c +++ b/src/lxc/confile.c

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] c/r: tell CRIU about cgproxy sockets

2015-11-17 Thread Tycho Andersen
l fail and cgproxy will probably give some weird errors. Signed-off-by: Tycho Andersen --- src/lxc/criu.c | 97 +- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 695a763..b10d58f 100644 ---

[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 Acked-by: Serge E. Hallyn --- src/lxc/utils.c | 30 -- 1 file changed, 12 inser

[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 --- src/lxc/utils.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/lxc/utils.c

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

2015-11-16 Thread Tycho Andersen
On Mon, Nov 16, 2015 at 02:49:56PM -0700, Tycho Andersen wrote: > Instead, let's just allocate new space for the proctitle to live and point > the kernel at that. > > Signed-off-by: Tycho Andersen > --- > src/lxc/lxccontainer.c | 2 +- > s

[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 --- src/lxc/lxccontainer.c | 2 +- src/lxc/utils.c| 29 + 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/sr

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

2015-11-16 Thread Tycho Andersen
hink we can 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 o

[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] 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 --- 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 100644 --- a/src/lxc/utils.c

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

2015-11-06 Thread Tycho Andersen
x27;t in criu 1.7, so it should only go into master. Signed-off-by: Tycho Andersen --- 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/src/lxc/criu.c +++ b/src/lxc/c

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

2015-11-06 Thread Tycho Andersen
93525c00c76b2804c46cf3c275d610ebe71cb4be. Signed-off-by: Tycho Andersen --- 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/src/lxc/utils.c @@ -51,20 +51,25

[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 --- 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..7ee6cbe 100644 --- a/src/lxc/criu.c

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

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

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

2015-11-06 Thread Tycho Andersen
t just won't be as pretty. Signed-off-by: Tycho Andersen --- 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/src/lxc/utils.c +

Re: [lxc-devel] odd freezer cgroup behavior

2015-10-28 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 free

[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 --- src/lxc/commands.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lxc/commands.c b/src/lxc/commands.c index b7

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 >

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

2015-09-11 Thread Tycho Andersen
Signed-off-by: Tycho Andersen --- .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/legacy/*.1 +doc/ko/*.1 +doc/ko/*.5 +doc

[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 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9c60c92..5ec52c5 100644 --- a/.gitignore +++ b/.giti

[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 --- src/lxc/lxc-checkconfig.in | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/lxc/lxc-checkconfig.in b/src/lxc/lxc-checkconfig.in index a4

[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 --- src/lxc/criu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sr

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, Au

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, Au

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 or

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: D

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 > >

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

2015-08-10 Thread Tycho Andersen
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 nothing reads the files that dump_net_info() writes, so let's just get rid of them. Signed-off-by: Tycho Andersen --- src/lxc/criu.c

[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 Signed-off-by: Tycho Andersen --- src/lxc/criu.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lxc/criu.c b/sr

[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 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3cb5bfb..35d89f2 100644 --- a/.gitignore +++ b/.gitignore @@ -150,5 +

Re: [lxc-devel] automatic user id mapping?

2015-08-06 Thread Tycho Andersen
Hi Harald, On Thu, Jul 30, 2015 at 03:42:49PM +0200, Harald Dunkel wrote: > Hi folks, > > I need local resource limits inside each container. Problem: > UID conflicts between containers. Setting lxc.id_map is *highly* > painful, because it just moves the burden to the admin. > > An automatic sol

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

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] 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 w

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 inte

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

2015-06-12 Thread Tycho Andersen
ing on error - causing a second instance > of the calling function. > > Signed-off-by: Serge Hallyn Acked-by: Tycho Andersen > --- > src/lxc/lxccontainer.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxc

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

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

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 thi

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

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

2015-06-09 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. v2: use /dev/null for stdin as well Reported-by: Coverity

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

2015-06-09 Thread Tycho Andersen
C's short circuiting Reported-by: Coverity Signed-off-by: Tycho Andersen --- 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'

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.

[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 --- src/lxc/criu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/criu.c b/src/lxc/cr

[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 --- 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 criu_opts *opts

[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 --- src/lxc

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

2015-06-08 Thread Tycho Andersen
Signed-off-by: Tycho Andersen --- 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(const char *path

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

2015-06-02 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 Signed-off-by: Tycho Andersen --- src/lxc/criu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -

Re: [lxc-devel] hardcoded criu path?

2015-06-02 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] c/r: remember to clean up pidfile

2015-06-01 Thread Tycho Andersen
When restoring, we didn't clean up the pidfile that criu uses to pass us the init pid on error or success; let's do that. Signed-off-by: Tycho Andersen --- src/lxc/criu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 1913473..d45c96c 10

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

2015-05-06 Thread Tycho Andersen
Signed-off-by: Tycho Andersen --- 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() close(pipes[1

[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 --- 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 --- a/src/lxc/lxccontainer.c

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, > &

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 thi

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

2015-04-22 Thread Tycho Andersen
ff-by: Tycho Andersen --- 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 +3687,13 @@ static

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 par

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

2015-04-20 Thread Tycho Andersen
the flag. Instead, we just pass it down everywhere. Signed-off-by: Tycho Andersen --- src/lxc/execute.c | 4 ++-- src/lxc/lxc.h | 22 +- src/lxc/lxc_execute.c | 2 +- src/lxc/lxccontainer.c | 10 ++ src/lxc/start.c| 17 ++---

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

2015-04-20 Thread Tycho Andersen
On Mon, Apr 20, 2015 at 05:06:02PM +, 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 par

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

2015-04-20 Thread Tycho Andersen
re that we have pointers to the devcies in init's rootfs instead of the host's. Signed-off-by: Tycho Andersen --- src/lxc/lxccontainer.c | 6 -- src/lxc/start.c| 7 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxc

[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 lxc-devel@lists.linuxcontainers.or

[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 --- src/lxc/criu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/criu.c b/src/lxc

[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

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 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

[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: 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

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

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 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 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,

[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.

[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

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

  1   2   >