[CRIU] implementing some kind of --leave-frozen option for c/r in CRIU

Tycho Andersen tycho.andersen at canonical.com
Mon May 16 09:46:03 PDT 2016


On Mon, May 16, 2016 at 07:42:11PM +0300, Batalov Eugene wrote:
> Tycho, there is another way to leave container paused after dump.
> 
> recently we've sent patch that allows to send sigstop to all the processes
> in the ps tree.
> It adds --leave-stopped flag.
> See it here.
> https://github.com/eabatalov/criu-dump-validator/commits/restore-leave-stopeed-criu-dev
> The patchset review is pending.
> This is implemented mostly in one line. The second patch it for test.
> Also this solution has drawback when used with shell jobs. See the first
> patch in the series.
> 
> The only problem is how to continue container? There is a script for this:
> https://github.com/xemul/criu-scripts/blob/master/pstree_cont.py

Yes, I saw that. The --leave-frozen I think using the cgroup freezer
is a much cleaner solution to this, and I'd prefer that method.
However, I'm fine with whatever Pavel decides. The --leave-frozen
patch itself isn't very big either.

Tycho

> 
> 
> 
> 2016-05-16 18:05 GMT+03:00 Tycho Andersen <tycho.andersen at canonical.com>:
> 
> > Hi Pavel,
> >
> > On Mon, May 16, 2016 at 03:31:57PM +0300, Pavel Emelyanov wrote:
> > >
> > > There was a patch 8b04551c (restore: restore freezer cgroup state) in 2.0
> > > that turned cgroup into whatever state it was before dump. Can it be
> > fixed
> > > to make '--leave-frozen' alter the behavior of
> > add_freezer_state_for_restore()
> > > and set it to 'frozen' always?
> >
> > It looks like hooking add_freezer_state_for_restore() would be for
> > leaving the tasks as frozen on restore, but what I'm interested in is
> > leaving them frozen on dump; my original patch in the thread is a
> > slight hack for this, but it will work on dump whereas hooking
> > add_freezer_state_for_restore won't.
> >
> > Tycho
> >
> 
> 
> 
> -- 
> Best regards,
> Eugene Batalov.


More information about the CRIU mailing list