All of lore.kernel.org
 help / color / mirror / Atom feed
* Testing lxc 0.6.5 in Fedora 13
@ 2010-03-21 19:50 Grzegorz Nosek
  2010-03-23 21:28 ` Matt Helsley
       [not found] ` <20100321195044.GA23757-yp6mvK3Bdd2rDJvtcaxF/A@public.gmane.org>
  0 siblings, 2 replies; 39+ messages in thread
From: Grzegorz Nosek @ 2010-03-21 19:50 UTC (permalink / raw)
  To: containers-qjLDD68F18O7TbgM5vRIOg

Hi all,

I'd like to report a few problems/gotchas I ran into while testing LXC
in Fedora 13 (current Rawhide).

1. PTY allocation fails (PEBKAC/documentation issue)

While starting up a guest (CentOS 5.4) I get a series of messages:

lxc-start 1268746923.067 WARN     lxc_conf - failed to mount '/dev/pts/2'->'./rootfs.centos/dev/tty1'
lxc-start 1268746923.067 WARN     lxc_conf - failed to mount '/dev/pts/3'->'./rootfs.centos/dev/tty2'
lxc-start 1268746923.067 WARN     lxc_conf - failed to mount '/dev/pts/4'->'./rootfs.centos/dev/tty3'
lxc-start 1268746923.067 WARN     lxc_conf - failed to mount '/dev/pts/5'->'./rootfs.centos/dev/tty4'
lxc-start 1268746923.067 INFO     lxc_conf - 4 tty(s) has been setup

The mingetty set up to start at /dev/tty1 is not attached to any known
TTY and is not accessible via lxc-console:

CONTAINER    PID TTY          TIME CMD
centos      1186 ?        00:00:00 init
centos      1368 ?        00:00:00 syslogd
centos      1371 ?        00:00:00 klogd
centos      1386 ?        00:00:00 sshd
centos      1396 ?        00:00:00 mingetty

The mount fails because there are no ttyX files inside the container's
file system. This may qualify as a PEBKAC but it might be nice to
document somewhere (touching empty plain files with appropriate names
makes the container boot).

2. Weird strace behaviour across pidns boundary

When strace'ing (with -ff) lxc-start, I get a proper strace for the
directly spawned process and the container init. However, any processes
spawned by the container's init are not straced properly (I get two
empty files, named <foo>.<pid-in-root-ns> and <foo>.2 -- presumably pid
inside the container). The container also seems to malfunction under
strace (looks like exec() failing as lxc-ps shows two "init" processes).

This is quite painful as it prevents strace'ing processes in containers
even after startup. Here's a snippet of strace'ing a bash (pid 179
inside, pid 2959 outside) trying to run 'ls'. The shell hangs until I
kill the strace process.

pipe([3, 4])                            = 0
clone(Process 197 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7859708) = 197
Process 2999 attached (waiting for parent)
[pid  2959] setpgid(197, 197)           = 0
[pid  2959] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
[pid  2959] rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
[pid  2959] close(3)                    = 0
[pid  2959] close(4)                    = 0
[pid  2959] rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [CHLD], 8) = 0
[pid  2959] ioctl(255, TIOCSPGRP, [197]) = 0
[pid  2959] rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
[pid  2959] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
[pid  2959] rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
[pid  2959] waitpid(-1, Process 2959 suspended
^C <unfinished ...>
Process 2959 detached
Process 197 detached
Process 2999 detached

'strace ls' ran completely inside the container works as expected.

3. Missing /dev/console

There's no "obviously good" default (apart maybe from lxc-start's
stdout/err) but I guess the messages from init could end up somewhere
useful (right now it tries /dev/console, /dev/tty0 and /dev/null, in
order). Maybe an extra PTY (just start counting from 0) would be enough?
Or even a symlink (tty0 -> tty1). But then I think that lxc-start should
attach to the PTY as early as possible to capture boot messages.


Best regards,
 Grzegorz Nosek

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2010-04-06 15:30 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-21 19:50 Testing lxc 0.6.5 in Fedora 13 Grzegorz Nosek
2010-03-23 21:28 ` Matt Helsley
     [not found]   ` <20100323212834.GH20796-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-03-24  9:25     ` Greg Kurz
2010-03-25 21:33     ` Grzegorz Nosek
2010-03-25 21:33       ` Grzegorz Nosek
     [not found]       ` <20100325213356.GB20541-yp6mvK3Bdd2rDJvtcaxF/A@public.gmane.org>
2010-03-26 11:11         ` Oleg Nesterov
2010-03-26 11:11       ` Oleg Nesterov
2010-03-26 11:32         ` Grzegorz Nosek
2010-03-26 12:00           ` Oleg Nesterov
2010-03-26 12:46             ` Matt Helsley
2010-03-26 13:34               ` Oleg Nesterov
     [not found]               ` <20100326124619.GC3345-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-03-26 13:34                 ` Oleg Nesterov
     [not found]             ` <20100326120028.GA11311-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-26 12:46               ` Matt Helsley
     [not found]           ` <20100326113201.GB17113-yp6mvK3Bdd2rDJvtcaxF/A@public.gmane.org>
2010-03-26 12:00             ` Oleg Nesterov
2010-03-26 11:53         ` Matt Helsley
     [not found]           ` <20100326115357.GA3345-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-03-26 12:45             ` Grzegorz Nosek
2010-03-26 12:45           ` Grzegorz Nosek
2010-03-26 12:54             ` Matt Helsley
2010-03-26 13:56               ` Oleg Nesterov
     [not found]               ` <20100326125459.GD3345-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-03-26 13:56                 ` Oleg Nesterov
2010-03-26 13:47             ` Oleg Nesterov
2010-04-06  3:44               ` Roland McGrath
     [not found]                 ` <20100406034443.8B40ED477-nL1rrgvulkc2UH6IwYuUx0EOCMrvLtNR@public.gmane.org>
2010-04-06 13:53                   ` Matt Helsley
2010-04-06 13:53                 ` Matt Helsley
     [not found]                   ` <20100406135345.GC3345-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-04-06 14:36                     ` Oleg Nesterov
2010-04-06 15:13                     ` Eric W. Biederman
2010-04-06 14:36                   ` Oleg Nesterov
     [not found]                     ` <20100406143635.GA12315-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-04-06 15:17                       ` Eric W. Biederman
2010-04-06 15:17                     ` Eric W. Biederman
2010-04-06 15:13                   ` Eric W. Biederman
     [not found]                     ` <m1vdc48vhy.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-04-06 15:29                       ` Matt Helsley
2010-04-06 15:29                     ` Matt Helsley
     [not found]               ` <20100326134709.GB15790-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-04-06  3:44                 ` Roland McGrath
     [not found]             ` <20100326124522.GD17113-yp6mvK3Bdd2rDJvtcaxF/A@public.gmane.org>
2010-03-26 12:54               ` Matt Helsley
2010-03-26 13:47               ` Oleg Nesterov
     [not found]         ` <20100326111131.GA8604-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-26 11:32           ` Grzegorz Nosek
2010-03-26 11:53           ` Matt Helsley
2010-03-24  9:25   ` Greg Kurz
     [not found] ` <20100321195044.GA23757-yp6mvK3Bdd2rDJvtcaxF/A@public.gmane.org>
2010-03-23 21:28   ` Matt Helsley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.