Re: [lxc-devel] [RFC] lxc-start: daemonize by default

2014-05-08 Thread Deyan Doychev
On 04/30/2014 05:20 PM, John Peacock wrote: > Yes, Yes, 1024 times Yes! And 1024 times more! Speaking of defaults here is another proposal. Since all the lxc- commands are always invoked using the -n option and specifying a container name, we could allow for -n to be skipped. For example if we h

[lxc-devel] [PATCH] criu: Add exec-cmd option (v3)

2014-03-22 Thread Deyan Doychev
From: Deyan Doychev The --exec-cmd option specifies a command that will be execvp()-ed on successful restore. This way the command specified here will become the parent process of the restored process tree. Waiting for the restored processes to finish is responsibility of this command. All

Re: [lxc-devel] [PATCH] criu: Add exec-cmd option (v2)

2014-03-21 Thread Deyan Doychev
On 03/21/2014 01:56 PM, Pavel Emelyanov wrote: > On 03/21/2014 03:51 PM, Andrew Vagin wrote: > 1. we cannot check the exec call >>> This is hardly required, since even if it fails, we cannot abort the >>> restored tree. >> Can we resume the restored tree before executing "exec-cmd". >> My opin

Re: [lxc-devel] [PATCH] criu: Add exec-cmd option (v2)

2014-03-21 Thread Deyan Doychev
On 03/21/2014 11:14 AM, Pavel Emelyanov wrote: >>> ... >>>wait(NULL); >>> >>>return 0; >>> @@ -1600,6 +1600,9 @@ int cr_restore_tasks(void) >>> { >>>int ret = -1; >>> >>> + if (opts.exec_cmd && opts.restore_detach &&

Re: [lxc-devel] [PATCH] criu: Add exec-cmd option (v2)

2014-03-21 Thread Deyan Doychev
Hi Pavel, On 03/20/2014 08:38 PM, Pavel Emelyanov wrote: > On 03/20/2014 08:24 PM, Deyan Doychev wrote: >> From: Deyan Doychev >> ... >> --- a/cr-restore.c >> +++ b/cr-restore.c >> @@ -1552,7 +1552,7 @@ static int restore_root_task(struct pstree_item *init) >&

[lxc-devel] [PATCH] criu: Add exec-cmd option (v2)

2014-03-20 Thread Deyan Doychev
From: Deyan Doychev The --exec-cmd option specifies a command that will be execvp()-ed on successful restore. This way the command specified here will become the parent process of the restored process tree. When this option is specified criu will fork to become a daemon before it starts

Re: [lxc-devel] [CRIU] [PATCH] criu: Add exec-cmd option.

2014-03-20 Thread Deyan Doychev
On 03/20/2014 10:34 AM, Pavel Emelyanov wrote: > On 03/19/2014 09:39 PM, Deyan Doychev wrote: > >> diff --git a/cr-restore.c b/cr-restore.c >> index b352daa..e528e3c 100644 >> --- a/cr-restore.c >> +++ b/cr-restore.c >> @@ -1600,6 +1600,9 @@ int cr_restore_ta

Re: [lxc-devel] [CRIU] [PATCH] criu: Add exec-cmd option.

2014-03-20 Thread Deyan Doychev
Hi Andrew, On 03/19/2014 10:29 PM, Andrew Vagin wrote: >> diff --git a/crtools.c b/crtools.c >> > index 047ac53..5591225 100644 >> > --- a/crtools.c >> > +++ b/crtools.c >> > @@ -77,6 +77,23 @@ bad_ns: >> >return -1; >> > } >> > >> > +char **parse_exec_cmd(char *optarg) >> > +{ > I don't li

[lxc-devel] [PATCH] criu: Add exec-cmd option.

2014-03-19 Thread Deyan Doychev
From: Deyan Doychev The --exec-cmd option specifies a command that will be execve()-ed on successful restore. This way the command specified here will become the parent process of the restored process tree. When this option is specified criu will fork to become a daemon before it starts

Re: [lxc-devel] [CRIU] LXC integration

2014-03-18 Thread Deyan Doychev
On 03/18/2014 01:41 PM, Pavel Emelyanov wrote: >>> 2) Currently /dev/console and /dev/ttyX in the container are actually >>> bind-mounted /dev/pts/Y files. I've been thinking about adding code >>> that >>> creates master-slave pty pairs when restoring mount-points and >>>

Re: [lxc-devel] [CRIU] LXC integration

2014-03-18 Thread Deyan Doychev
Hello, I am copying the lxc-devel mailing list because there will be patches to LXC as well. Thanks for the fast response. On 03/18/2014 09:43 AM, Pavel Emelyanov wrote: > On 03/18/2014 01:35 AM, Deyan Doychev wrote: >> Hello everybody! >> >> For the last few weeks I'