[lxc-users] lxc-console breaks on container reboot if someone is attached to it

Bostjan Skufca bostjan at a2o.si
Thu Mar 5 02:21:03 UTC 2015


Hi there,

if container is rebooted while someone is attached to its primary console
(/dev/lxc/console), then than console becomes "unreachable" until container
is shut down and started again. Consoles /dev/lxc/ttyX work as expected all
the time.

Here are the steps to reproduce (lxc 1.0.7), assuming container is already
running:

### Step 1: attach to /dev/console, for example to see shutdown messages
HOST# lxc-console -n CONTAINER -t console

### Step 2: reboot the container
CONTAINER# reboot

### Step 3: watch the shutdown messages in console on host:
...(all irrelevant content)...
AT LAST:  Rebooting...
lxc_container: console.c: lxc_console_cb_tty_master: 672 Input/output error
- failed to read

### Step 4: try to reconnect console
HOST# lxc-console -n CONTAINER -t console
lxc_container: commands.c: lxc_cmd_console: 709 console 0 invalid,busy or
all consoles busy

### Step 5: connect to tty1
HOST# lxc-console -n CONTAINER -t 1
...(still works)...


Can someone confirm this (mis)behaviour?
b.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150305/ca24f089/attachment.html>


More information about the lxc-users mailing list