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

2014-03-24 Thread Marian Marinov
On 03/24/2014 11:23 PM, Pavel Emelyanov wrote: On 03/22/2014 08:14 PM, Deyan Doychev wrote: Signed-off-by: Deyan Doychev Applied, thanks a lot! Deyan, it would also be great if you provide a test for the --exec-cmd option so that we could include it in the daily jenkins run to make sure tha

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

2014-03-24 Thread Pavel Emelyanov
On 03/25/2014 01:42 AM, Marian Marinov wrote: > On 03/24/2014 11:23 PM, Pavel Emelyanov wrote: >> On 03/22/2014 08:14 PM, Deyan Doychev wrote: >>> >>> Signed-off-by: Deyan Doychev >> >> Applied, thanks a lot! >> >> Deyan, it would also be great if you provide a test for the --exec-cmd option >> so

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

2014-03-24 Thread Pavel Emelyanov
On 03/22/2014 08:14 PM, Deyan Doychev wrote: > > Signed-off-by: Deyan Doychev Applied, thanks a lot! Deyan, it would also be great if you provide a test for the --exec-cmd option so that we could include it in the daily jenkins run to make sure that the functionality doesn't get accidentally br

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

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

2014-03-21 Thread Andrew Vagin
On Fri, Mar 21, 2014 at 02:02:43PM +0400, Pavel Emelyanov wrote: > On 03/21/2014 01:39 PM, Deyan Doychev wrote: > > > > On 03/21/2014 11:14 AM, Pavel Emelyanov wrote: > ... > wait(NULL); > > return 0; > @@ -1600,6 +1600,9 @@ int cr_resto

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

2014-03-21 Thread Andrew Vagin
On Thu, Mar 20, 2014 at 10:38:27PM +0400, Pavel Emelyanov wrote: > On 03/20/2014 08:24 PM, Deyan Doychev wrote: > > 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 pa

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 Pavel Emelyanov
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 opinion is that we can't, because it may fail. > > S

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

2014-03-21 Thread Pavel Emelyanov
On 03/21/2014 01:39 PM, Deyan Doychev wrote: > > 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;

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 Pavel Emelyanov
On 03/21/2014 12:57 PM, Deyan Doychev wrote: > 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 p

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) >> >> write_stats(RESTORE_STATS)

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

2014-03-20 Thread Pavel Emelyanov
On 03/20/2014 08:24 PM, Deyan Doychev wrote: > 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 specifi

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

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