[CRIU] LXC integration

Deyan Doychev deyan at 1h.com
Tue Mar 18 05:13:31 PDT 2014


On 03/18/2014 01:41 PM, Pavel Emelyanov wrote:
>>>> >>> 2) Currently /dev/console and /dev/ttyX in the container are actually
>>>> >>> bind-mounted /dev/pts/Y files. I've been thinking about adding code that
>>>> >>> creates master-slave pty pairs when restoring mount-points and
>>>> >>> bind-mounts them to the /dev/ttyX files. After that, with a small patch
>>>> >>> to the tty.c file we'll be able to use the already allocated slaves,
>>>> >>> while the lxc-start-like command from 1) will get the masters' open file
>>>> >>> descriptors upon exec().
>>> >> Absolutely. But the code should be implemented as plugin.
>> > 
>> > I wrote a simple plugin that handles the external tty/console mounts by
>> > simply doing nothing. It was just a test out of curiosity. Unfortunately
>> > to get it to successfully dump the container and later restore it I had
>> > to make a few changes to tty.c - we still end up there because we have
>> > pts files opened.
>> > 
>> > Do you have any idea of how should I get around this using only a plugin?
> Hm... If we properly restore the /dev/console and /dev/tts in plugin, then
> existing tty restoring code should just pick those up. Can you shed more
> light on what problems you have with ptys?
>

In this case I assume the problems I was having were due to the fact
that in the test plugin I just skipped dumpig and restoring these mount
points and left in /dev/ttyX what was previously there (some tty device).

I will now concentrate on implementing the exec code and return to this
when I get to fixing /dev/console and /dev/ttyX later on.

If I bump into any problem, I will ask here.

Thanks,
Deyan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140318/10a9c02c/attachment.sig>


More information about the CRIU mailing list