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

Re: [lxc-devel] Missing packet in archlinux template

2014-03-20 Thread Leonid Isaev
On Thu, 20 Mar 2014 10:19:53 -0400 Stéphane Graber wrote: > On Thu, Mar 20, 2014 at 03:05:58PM +0100, Julien Delaborde wrote: > > Hi, > > > > I used the archlinux template to create an archlinux container but the > > system could not properly start. In fact, I discovered thanks to the logs > > t

Re: [lxc-devel] Missing packet in archlinux template

2014-03-20 Thread Stéphane Graber
On Thu, Mar 20, 2014 at 03:05:58PM +0100, Julien Delaborde wrote: > Hi, > > I used the archlinux template to create an archlinux container but the > system could not properly start. In fact, I discovered thanks to the logs > that there were some missing binaries (mount, agetty, …). In archlinux, >

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

2014-03-20 Thread Andrew Vagin
Add Adrian to CC. He is integrating CRIU in OpenMPI and he may be interested in this patch too. On Wed, Mar 19, 2014 at 07:39:24PM +0200, Deyan Doychev wrote: > From: Deyan Doychev > > The --exec-cmd option specifies a command that will be execve()-ed on > successful > restore. This way the com

[lxc-devel] Missing packet in archlinux template

2014-03-20 Thread Julien Delaborde
Hi, I used the archlinux template to create an archlinux container but the system could not properly start. In fact, I discovered thanks to the logs that there were some missing binaries (mount, agetty, …). In archlinux, these binaries are in the packet "core/util-linux". I tried to create a new

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

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

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_tasks(void) >> { >> int ret = -1; >>

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

2014-03-20 Thread Pavel Emelyanov
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_tasks(void) > { > int ret = -1; > > + if (opts.exec_cmd && daemon(1, 0)) > +

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