[CRIU] Restarting Process in an LXC Container
Pavel Emelyanov
xemul at parallels.com
Wed Jan 28 06:20:05 PST 2015
On 01/28/2015 05:11 PM, Andrew Vagin wrote:
> On Wed, Jan 21, 2015 at 10:42:39PM -0700, Tycho Andersen wrote:
>> On Tue, Jan 20, 2015 at 02:43:09PM +0300, Andrew Vagin wrote:
>>> On Mon, Jan 19, 2015 at 06:09:47PM +0100, Thouraya TH wrote:
>>>> Hello :) thanks a lot for help.
>>>>
>>>> How do you enter into CT? Do you use screen or ssh?
>>>>
>>>> Before the Dumping Process:
>>>>
>>>> root at g-2:~# lxc-ls -f
>>>> NAME STATE IPV4 IPV6 GROUPS AUTOSTART
>>>> -----------------------------------------------
>>>> worker STOPPED - - - NO
>>>> root at g-2:~# lxc-start -n worker
>>>> root at g-2:~# lxc-attach -n worker
>>>
>>> I've understood the problem and its causes. If you execute a process in
>>> CT, it lives in CT's pid namespaces, but it belongs to another process
>>> tree, becuase its parent is outside of the CT.
>>>
>>> Currently CRIU is able to dump only one process tree. I am not sure that
>>> we will fix this problem in a near future. I can suggest you to use
>>> screen or tmux, they have to workaround your problem.
>>
>> If I've understood the problem correctly, it sounds like one thing we
>> could do to prevent this error is to have lxc-checkpoint make sure
>> nobody is attached to the container via lxc-attach? (Or ideally via
>> nsenter or whatever, although that may be harder.)
>
> Yes, you are right. But I think we need to check this in CRIU. After
> freezing processes CRIU should read a process list from /proc and checks
> that there are no new processes.
And we need an CLI option what to do in this case. E.g. for Virtuozzo we
sometimes select the "kill them all" instead of "abort with warning".
Thanks,
Pavel
More information about the CRIU
mailing list