Open brauner opened 3 years ago
@avagin The error message is from code you wrote (a long time ago). Do you have any ideas how to make this work?
Hi @brauner, a similar problem was resolved in runc by using the orphan-pts-master
option (https://github.com/opencontainers/runc/commit/1c43d091a18a2f2dd73b46d49c678c265cf1ace3). However, this option is available only via RPC, but it can be used with libcriu (https://github.com/checkpoint-restore/criu/commit/83be11f1f4a24d05814a66061e04b9b4d0825763, https://github.com/containers/crun/commit/a15a72428571debaf6cb87c1fb318f4442d96602).
On Mon, Nov 30, 2020 at 01:24:45PM -0800, Radostin Stoyanov wrote:
Hi @brauner, a similar problem was resolved in runc by using the
orphan-pts-master
option (https://github.com/opencontainers/runc/commit/1c43d091a18a2f2dd73b46d49c678c265cf1ace3). However, this option is available only via RPC, but it can be used
Ok, if that fixes it it would be great if we could also export this as a command line option.
Thanks! Christian
On Tue, Dec 01, 2020 at 02:11:34AM -0800, Christian Brauner wrote:
On Mon, Nov 30, 2020 at 01:24:45PM -0800, Radostin Stoyanov wrote:
Hi @brauner, a similar problem was resolved in runc by using the
orphan-pts-master
option (https://github.com/opencontainers/runc/commit/ 1c43d091a18a2f2dd73b46d49c678c265cf1ace3). However, this option is available only via RPC, but it can be usedOk, if that fixes it it would be great if we could also export this as a command line option.
You know how this works in open source, right? ;-) Patches are welcome :-)
Thanks! Christian
-- Sincerely yours, Mike.
On Tue, Dec 01, 2020 at 03:32:23AM -0800, rppt wrote:
On Tue, Dec 01, 2020 at 02:11:34AM -0800, Christian Brauner wrote:
On Mon, Nov 30, 2020 at 01:24:45PM -0800, Radostin Stoyanov wrote:
Hi @brauner, a similar problem was resolved in runc by using the
orphan-pts-master
option (https://github.com/opencontainers/runc/commit/ 1c43d091a18a2f2dd73b46d49c678c265cf1ace3). However, this option is available only via RPC, but it can be usedOk, if that fixes it it would be great if we could also export this as a command line option.
You know how this works in open source, right? ;-) Patches are welcome :-)
You should read the last sentences in my original issue message above. ;)
On Tue, Dec 01, 2020 at 05:00:38AM -0800, Christian Brauner wrote:
On Tue, Dec 01, 2020 at 03:32:23AM -0800, rppt wrote:
On Tue, Dec 01, 2020 at 02:11:34AM -0800, Christian Brauner wrote:
On Mon, Nov 30, 2020 at 01:24:45PM -0800, Radostin Stoyanov wrote:
Hi @brauner, a similar problem was resolved in runc by using the
orphan-pts-master
option (https://github.com/opencontainers/runc/commit/ 1c43d091a18a2f2dd73b46d49c678c265cf1ace3). However, this option is available only via RPC, but it can be usedOk, if that fixes it it would be great if we could also export this as a command line option.
You know how this works in open source, right? ;-) Patches are welcome :-)
You should read the last sentences in my original issue message above. ;)
tl'dr, sorry :)
Highly appreciated!
A friendly reminder that this issue had no activity for 30 days.
Any update on this one? As seen above, it's breaking basic operation for us in LXC/LXD.
Any update on this one? As seen above, it's breaking basic operation for us in LXC/LXD.
Unfortunately, I am not aware of any changes to solve this.
I'm trying to fix a bunch of long-standing CRIU issues in LXC and I'm starting with dumping tty devices.
When launching LXC containers user can specify how many ttys they want via
lxc.tty.max
. For examplelxc.tty.max = 4
would mean that LXC allocates 4 tty devices:These tty devices are created from the container's devpts instance. Specifically, when the container is started it will mount
devpts
at/dev/pts
and also create a bind-mount of/dev/pts/ptmx
to/dev/ptmx
to please AppArmor's symlink handling. The LXC will allocate 4 pty devices viaopentty()
. The container's devpts instance will thus show:The file descriptors for these devices are sent by the container to the LXC monitor process, i.e. the parent of the container. The monitor process stashes these file descriptors for later usage.
The container now proceeds to bind-mount the
/dev/pts/*
devices onto/dev/tty*
which LXC has created as dummy bind-mount targets with permission 0000. The mount table thus looks like this:When I now dump a container criu will fails with:
The command line to dump the container is:
Note that the
--ext-mount-map /dev/console:console --external tty[881f:18]
line is for/dev/console
which is a pty device bind-mounted from the host, i.e. from the host's devpts instance not the containers!My question is, how do I handle these
/dev/tty*
devices I just described above correctly during dump (and also in restore for that matter). I'm happy to patch criu if that's required.