Hi @monstermunchkin!
I would like to improve the project’s gentoo images or make my own, as they don’t behave.
- Containers made from the gentoo/current image ignore shutdown signals from the host, so that ‘lxc stop’ doesn’t work:
user@host Sa Jun 29 09:34:09 ~ $ lxc list
+-----------+---------+------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-----------+---------+------+------+------------+-----------+
| gentooC03 | STOPPED | | | PERSISTENT | 0 |
+-----------+---------+------+------+------------+-----------+
user@host Sa Jun 29 14:27:13 ~ $ lxc start gentooC03
user@host Sa Jun 29 14:27:24 ~ $ lxc list
+-----------+---------+---------------------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-----------+---------+---------------------+------+------------+-----------+
| gentooC03 | RUNNING | 10.24.21.154 (eth0) | | PERSISTENT | 0 |
+-----------+---------+---------------------+------+------------+-----------+
user@host Sa Jun 29 14:27:26 ~ $ lxc stop gentooC03
lxc stop hangs indefinitely:
$ ps -ef | grep lxc
...
user 17909 6044 0 14:27 pts/6 00:00:00 lxc stop gentooC03
...
$ strace -p 17909
strace: Process 17909 attached
epoll_pwait(4,
The only way to shut down the container is to enter it with ‘lxc exec /bin/bash’ and execute ‘shutdown -h now’. This is not ideal; not responding to signals means that host shutdown is delayed.
- It tries to spawn ttys from init before giving up. See Gentoo image; ttys die for my example.