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

Deyan Doychev deyan at 1h.com
Fri Mar 21 05:32:24 PDT 2014


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 opinion is that we can't, because it may fail.
>>
>> So maybe we need to fork a process for "exec-cmd" before restoring
>> processes.
>>
>> criu restore
>> \
>>  criu restore (It will exec the cmd)
>>   \
>>    restore tree
>>
>> This intermediate process does nothing while we are restoring processes.
>> If all processes are restored successfully, the first process gives a
>> signal to the second one to exec the cmd. And only if the cmd is
>> executed successfully, the first process resumes the restored tree.
>>
>> In this case we will able to safely rollback if exec-cmd fails.
>>
>> Does it sound reasonable?
> It looks reasonable and unifies the --exec-cmd with and without -d option.
> An extra process in non-detach case doesn't look bad. Dayan, what do you think?
>
> Thanks,
> Pavel

Sounds like a very good solution to the problem. I am OK to implement
this when I get to the second patch.

Thanks,
Deyan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140321/766d31ea/attachment.sig>


More information about the CRIU mailing list