[CRIU] [PATCH] zdtm: add a small program to create a zdtm container

Pavel Emelyanov xemul at parallels.com
Wed Aug 13 12:40:44 PDT 2014


>>> Why not simply move the contents of test/zdtm_ct.c into crtools.c, executed
>>> conditionally based on -n, --namespace, and call it initially implemented?
>>
>> This is because creating a namespace typically requires setting one up.
>> E.g. if we want to put the restored tree into pid namespace, we should
>> provide an init task, because root task in images doesn't have pid 1.
>> If we want to restore tasks into net namespace, while they previously
>> didn't live in it, we have to configure this new net namespace so that
>> e.g. sockets got restored properly.
> 
> Doesn't the proposed code in test/zdtm_ct.c do these things?

It does, but in a very specific way -- the minimally sufficient to zdtm.

>> With that, my idea is that if we want to restore images into new set of
>> namespaces, we should create them, configure and then call criu restore.
> 
> CRIU can't do everything, but if we are considering putting code in the
> repository to do something, such as set up namespaces, why not put it in the
> most convenient place?

I agree, but enabling the -n option implies, that it would be suitable
for _every_ usage scenario, which is impossible to achieve. If we could
equip it with something caller can use to specify _how_ to configure
the namespace, this would be OK. But what can it be?

Thanks,
Pavel




More information about the CRIU mailing list