[CRIU] Restarting Process in an LXC Container

Thouraya TH thouraya87 at gmail.com
Thu Jan 22 08:49:50 PST 2015


Yes, it is fine with *ssh* and without *lxc-attach* :)
Thanks a lot :)
Bests.

2015-01-22 17:47 GMT+01:00 Pavel Emelyanov <xemul at parallels.com>:

> On 01/22/2015 07:41 PM, Thouraya TH wrote:
> > *Dumping Process* with - s option:
> >
> > root at g-9:/home# lxc-checkpoint *-s *-D /home/ImGLXC1Worker -n worker
> > root at g-9:/home# lxc-ls -f
> > NAME     STATE    IPV4  IPV6  GROUPS  AUTOSTART
> > -----------------------------------------------
> > worker   *STOPPED*  -     -     -       NO
> >
> > *I have done this test:*
> > You have said: "/Check the file contents *after dump* but *before
> restore*. Does this file exists
> > at all? Does it contain proper data?/"
> >
> > 1) dumping Process with -s option
> > 2) root at g-9:/home/ImGLXC1Worker1# lxc-start -n worker
> >     root at g-9:/home/ImGLXC1Worker1# lxc-ls -f
> > NAME     STATE    IPV4        IPV6  GROUPS  AUTOSTART
> > -----------------------------------------------------
> > worker   RUNNING  10.0.3.109  -     -       NO
> > worker1  STOPPED  -           -     -       NO
> > root at g-9:/home/ImGLXC1Worker1# ssh ubuntu@$(sudo lxc-info -n worker -H
> -i)
> > ..............
> > ubuntu at worker:/home$ vim results.txt
> >
> > *the file exists and contains the proper data.*
> >
> > 3) i stopped the container to test the restart:
> >    root at g-9:/home/ImGLXC1Worker1# lxc-stop -n worker
> >    root at g-9:/home/ImGLXC1Worker1# lxc-ls -f
> > NAME     STATE    IPV4  IPV6  GROUPS  AUTOSTART
> > -----------------------------------------------
> > worker   STOPPED  -     -     -       NO
> > worker1  STOPPED  -     -     -       NO
> >     root at g-9:/home/ImGLXC1Worker1#  *lxc-checkpoint -r* -D
> /home/ImGLXC1Worker1 -n worker
> >     root at g-9:/home/ImGLXC1Worker1# ssh ubuntu@$(sudo lxc-info -n worker
> -H -i)
> >     ^C
> >    root at g-9:/home/ImGLXC1Worker1#
> >    root at g-9:/home/ImGLXC1Worker1# lxc-ls -f
> >
> > ^CTraceback (most recent call last):
> >   File "/usr/bin/lxc-ls", line 432, in <module>
> >     containers = get_containers(root=True)
> >   File "/usr/bin/lxc-ls", line 261, in get_containers
> >     if container.controllable:
> > KeyboardInterrupt
> >
> > *it's blocked!! *
>
> This should be forwarded to LXC guys.
>
> > *I proceeded as follows and the test process in the container restarts
> correctly:
> >
> > Restart* (after dumping process without starting and stopping the
> container)
> >
> > root at g-9:/home# lxc-checkpoint -r -D /home/ImGLXC1Worker -n worker
> > root at g-9:/home#  lxc-ls -f
> > NAME     STATE    IPV4        IPV6  GROUPS  AUTOSTART
> > -----------------------------------------------------
> > worker   RUNNING  10.0.3.109  -     -       NO
> > worker1  STOPPED  -           -     -       NO
> > root at g-9:/home# ssh ubuntu@$(sudo lxc-info -n worker -H -i)
> > ..............
> > ubuntu at worker:/home$ vim results.txt
> >
> > i find the old and the new results in the file :)
>
> So everything is fine, isn't it?
>
> Thanks,
> Pavel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150122/33792914/attachment-0001.html>


More information about the CRIU mailing list