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

Andrew Vagin avagin at parallels.com
Thu Aug 14 06:23:44 PDT 2014


On Wed, Aug 13, 2014 at 11:40:44PM +0400, Pavel Emelyanov wrote:
> >>> 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.

Christopher, can we commit this patch? We can continue duscussing how
to do something similar in CRIU. And when we will find a solution, we will
remove this program.

Currently Jenkins waits this patch to continue testing CRIU.

Thanks.

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