[lxc-devel] [CRIU] LXC live migrate

Ranjib Dey dey.ranjib at gmail.com
Mon Dec 30 06:07:58 UTC 2013


hi all,

now that criu supports plugin[1], has any one tried revisiting this? we
should be able to address most of the issues encountered in this thread,


[1] http://criu.org/Plugins


On Wed, Nov 27, 2013 at 3:51 AM, Pavel Emelyanov <xemul at parallels.com>wrote:

> On 11/27/2013 01:58 PM, Daniel Lezcano wrote:
> > On 11/27/2013 09:54 AM, Pavel Emelyanov wrote:
> >> On 11/27/2013 06:19 AM, Qiang Huang wrote:
> >>> On 2013/11/27 0:19, Marian Marinov wrote:
> >>>> On my test setup it works for processes like apache, dovecot and
> mysql.
> >>>>
> >>>> However it does not work with containers:
> >>>>
> >>>> root at s321:~# criu dump -D deb1 -t 19332 --file-locks
> >>>> (00.004962) Error (namespaces.c:155): Can't dump nested pid namespace
> for 28352
> >>>> (00.004985) Error (namespaces.c:321): Can't make pidns id
> >>>> (00.005327) Error (cr-dump.c:1811): Dumping FAILED.
> >>>> root at s321:~#
> >>>> When I try to dump the init process(which I believe I should not do),
> here is what I see:
> >>>>     http://pastebin.com/DFC0ADpp
> >>>>
> >>>> (00.291294) Error (tty.c:222): tty: Unexpected format on path
> /dev/tty1
> >>>> (00.291315) Error (cr-dump.c:1491): Dump files (pid: 29702) failed
> with -1
> >>>> (00.291892) Error (cr-dump.c:1811): Dumping FAILED.
> >>>>
> >>>> This is my setup:
> >>>> 19332 ?        Ss     0:00 lxc-start -n deb1 -d
> >>>> 28352 ?        Ss     0:00  \_ init [3]
> >>>> 28393 ?        Ss     0:00      \_ /usr/sbin/apache2 -k start
> >>>> 28419 ?        S      0:00      |   \_ /usr/sbin/apache2 -k start
> >>>> 28422 ?        Sl     0:00      |   \_ /usr/sbin/apache2 -k start
> >>>> 28423 ?        Sl     0:00      |   \_ /usr/sbin/apache2 -k start
> >>>> 28489 ?        S      0:00      \_ /bin/sh /usr/bin/mysqld_safe
> >>>> 28620 ?        Sl     0:00      |   \_ /usr/sbin/mysqld
> --basedir=/usr --datadir=/var/lib/mysql --user=mysql
> >>>> --pid-file=/var/run/mysqld/mysqld.pid
> --socket=/var/run/mysqld/mysqld.sock --port
> >>>> 28621 ?        S      0:00      |   \_ logger -t mysqld -p
> daemon.error
> >>>> 28598 ?        Ss     0:00      \_ /usr/sbin/sshd
> >>>> 29702 pts/0    Ss+    0:00      \_ /sbin/getty 38400 tty1 linux
> >>>>
> >>>> I rebooted the container without getty on tty1 and then I got this:
> >>>>
> >>>> (00.260757) Error (mount.c:255): 86:/dev/tty4 doesn't have a proper
> root mount
> >> This is the reason. That's container's console which is a bind mounted
> tty from
> >> the host. And since this is an external connection, CRIU doesn't dump
> one.
> >>
> >> There are two ways to resolve this. The first is disable container's
> console. It's
> >> fast, but ugly. The second way is supporting one, but it would require
> criu hacking.
> >> We should detect, that this is an external tty, decide, that we're OK
> to disconnect
> >> it after dump and on restore -- connect it back.
> >
> > The third one would be to implement lxc-checkpoint and lxc-restart
> > (which are empty) to invoke CRUI. Then from there you can dump the
> > container's configuration and restart with.
>
> Yes, it's also possible and probably easier. But as far as the console is
> concerned,
> some patching on the criu code will still be needed.
>
> Thanks,
> Pavel
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20131229/af3a63be/attachment.html>


More information about the lxc-devel mailing list