[CRIU] [Q] cgroup roots rewritting

Cyrill Gorcunov gorcunov at gmail.com
Mon May 16 14:03:17 PDT 2016


On Mon, May 16, 2016 at 02:57:48PM -0600, Tycho Andersen wrote:
> > 
> > And I dont understand why we change @from here. Imagine you have
> > a several sets of controller all laying in cgroup 300. Then
> > we need to change it to say 400, and once first match hit
> > we change source 300 to 400 here and continue trying to
> > compare with it. Which is wrong I this -- the strstartswith
> > no longer match old '300' ones for the rest of the set.
> > What I'm missing here?
> 
> I think we have to change the *from there, because if you don't you
> end up with cg sets that have been rewritten, but CgroupDirEntrys
> which haven't been.

Ah, could be indeed.

> 
> I agree that the logic to change *from is wrong, though. Probably I
> never noticed because there aren't usually very many cg sets :). I
> think it should be that we still rewrite *from, but only at the very
> end, once we have iterated through all the cg sets. Does that make
> sense?

I think so. Anyway, I'm not yet sure I've a clear vision of how
it should be at the end.

Yes, I use --cgroup-root optio for restore but I noticed even
if I disable *from change the criu fails -- prepare_cgroup_sfd
still uses old 300 prefix instead of new one 400, so restore
fails because directories are in wrong place.

Gimme some more time to figure out where is the problem.
I just wated to notify you as soon as possible that
cgroup-root seems to be somehow weirdo in behaviour...

> 
> > We hit a problem when been renaming suspended container --
> > on restore we give it a new name (400) and criu can't
> > move taks in nonexisting cgroup 300, which container
> > had befor the renaming (of course in image all controllers
> > and sets have old 300 in dirs and paths).
> 
> I suppose you are using --cgroup-root here?
> 
> Tycho
> 
> > Could you please elaborate which scenario this commit
> > addresses? Actually the comment in code didn't help much :)
> > 
> > 	Cyrill
> 

	Cyrill


More information about the CRIU mailing list