Re: [Devel] [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread Stanislav Kinsbursky
21.05.2013 20:29, Oleg Nesterov пишет: On 05/21, J. Bruce Fields wrote: On Tue, May 21, 2013 at 05:28:36PM +0200, Oleg Nesterov wrote: OK, so do not do this. Export the new helper. You mean, export umh_set_fs_root() in the above? That might be OK. Yes, or even call_usermodehelper_root().

Re: [Devel] [PATCH 0/6] vzctl: Dump/restore of upstream containers (v3)

2013-05-21 Thread Kir Kolyshkin
On 05/21/2013 09:13 AM, Andrey Vagin wrote: The project CRIU is used for dumping and restoring containers. http://criu.org/ Known issues: Network devices are not supported yet. v2: The patch set was fixed according with Kir's comments. v3: env_create_FN returns PID or a negative error

Re: [Devel] [PATCH] cgroups: fix set command with beancounters upstream

2013-05-21 Thread Kir Kolyshkin
On 04/30/2013 03:17 AM, Glauber Costa wrote: On 04/30/2013 01:48 PM, Kir Kolyshkin wrote: On 04/29/2013 10:12 PM, Glauber Costa wrote: The kernel memory controller cannot flip states from unlimited to limited if there are already tasks in it. Therefore, we always have to run with *some* value

Re: [Devel] [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread Rusty Russell
Stanislav Kinsbursky writes: > Usermode helper executes all binaries in global "init" root context. This > doesn't allow to call to call the binary from other root (for example in a > container). > Currently, containerized NFS server requires an ability to execute a binary in > a other context, th

Re: [Devel] [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread Oleg Nesterov
On 05/21, J. Bruce Fields wrote: > > On Tue, May 21, 2013 at 05:28:36PM +0200, Oleg Nesterov wrote: > > > > OK, so do not do this. Export the new helper. > > You mean, export umh_set_fs_root() in the above? > > That might be OK. Yes, or even call_usermodehelper_root(). I didn't argue with the new

[Devel] [PATCH 6/6] vzctl: checkpoint/restoer of upstream CTs

2013-05-21 Thread Andrey Vagin
It can be done by any third party tools. sripts/ct-cpt and script/ct_rst are executed to dump and restore CT This patch adds scripts for CRIU. v2: add the GPL header and descriptions in scripts describe and check variables in scripts Signed-off-by: Andrey Vagin --- scripts/Makefile.am | 4

[Devel] [PATCH 5/6] vzctl: transfer fs in vps_chkpnt, vps_restore, env_start_FN

2013-05-21 Thread Andrey Vagin
Signed-off-by: Andrey Vagin --- include/env.h | 4 ++-- src/lib/hooks_vz.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/env.h b/include/env.h index 4fef438..7426d63 100644 --- a/include/env.h +++ b/include/env.h @@ -34,8 +34,8 @@ -typedef int (*en

[Devel] [PATCH 4/6] vzctl: move cpt/rst code in hook_vz

2013-05-21 Thread Andrey Vagin
Signed-off-by: Andrey Vagin --- include/cpt.h | 13 ++ include/types.h| 25 ++-- src/lib/cpt.c | 404 + src/lib/hooks_vz.c | 386 ++ 4 files changed, 417 insertions(+), 411 deletio

[Devel] [PATCH 3/6] vzctl: split vps_chkpnt and vps_restore

2013-05-21 Thread Andrey Vagin
It's a preparation for moving vz-specific code in hook_vz.c. Signed-off-by: Andrey Vagin --- src/lib/cpt.c | 43 +-- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/src/lib/cpt.c b/src/lib/cpt.c index 626c055..cca15b6 100644 --- a/src/lib/c

[Devel] [PATCH 2/6] vzctl: save PID of init in a state file

2013-05-21 Thread Andrey Vagin
CRIU requires a pid of the init. Signed-off-by: Andrey Vagin --- include/types.h| 2 ++ include/util.h | 1 + src/lib/hooks_ct.c | 18 +- src/lib/util.c | 5 + 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/include/types.h b/include/types.h inde

[Devel] [PATCH 1/6] vzctl: split ct_env_create (v2)

2013-05-21 Thread Andrey Vagin
ct_env_create will able to execute CT and to resume CT v2: A return code contains one of known codes with inverted sign. Signed-off-by: Andrey Vagin --- src/lib/hooks_ct.c | 79 +++--- 1 file changed, 45 insertions(+), 34 deletions(-) diff --git

[Devel] [PATCH 0/6] vzctl: Dump/restore of upstream containers (v3)

2013-05-21 Thread Andrey Vagin
The project CRIU is used for dumping and restoring containers. http://criu.org/ Known issues: Network devices are not supported yet. v2: The patch set was fixed according with Kir's comments. v3: env_create_FN returns PID or a negative error code Andrey Vagin (6): vzctl: split ct_env_

Re: [Devel] [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread J. Bruce Fields
On Tue, May 21, 2013 at 05:28:36PM +0200, Oleg Nesterov wrote: > You know, I am puzzled. Everything looks so clear that I can't > understand what I could miss. > > On 05/20, J. Bruce Fields wrote: > > > > On Mon, May 20, 2013 at 05:10:01PM +0200, Oleg Nesterov wrote: > > > On 05/20, Stanislav Kins

Re: [Devel] [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread Oleg Nesterov
You know, I am puzzled. Everything looks so clear that I can't understand what I could miss. On 05/20, J. Bruce Fields wrote: > > On Mon, May 20, 2013 at 05:10:01PM +0200, Oleg Nesterov wrote: > > On 05/20, Stanislav Kinsbursky wrote: > > > > > OK, why nfs can't simply use this code > > > > st