I have a headless server with a few LXC containers running. Up until upenrc-0.28 I only had a minor problem with samba starting up after reboot. Now I have openrc-0.32.1, and it seems the developer of start-stop-daemon decided to only start sshd once on a physical machine, regardless of whether sshd is fired up on the host or in any LXC container. Same for vixie-cron, but that's not a critical problem. Here is the problem: after boot I don't have sshd anymore on the host system, because by chance one of the LXC containers started it first. This kindof leaves me out of the system. As a workaround to this bug I decided to stop sshd in all containers (for now, until you fix it), but I cannot do the same with vixie-cron since backup jobs are scheduled in each container. Here is a sample session trying to start sshd on LXC host pinky while sshd is running in container mail. You can see start-stop-daemon misdiagnoses sshd as running, and decides to not restart it. Next I log into mail via lxc-console, stop sshd inside it, and now start-stop-daemon happily starts sshd on host pinky. cipi@pinky ~ $ sudo rc-service sshd restart * Stopping sshd ... [ ok ] * Starting sshd ... * start-stop-daemon: /usr/sbin/sshd is already running [ !! ] * ERROR: sshd failed to start cipi@pinky ~ $ sudo lxc-console -n mail Connected to tty 1 Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+a> to enter Ctrl+a itself mail ~ # rc-service sshd stop * No permission to apply cgroup settings * Stopping sshd ... [ ok ] mail ~ # logout cipi@pinky ~ $ sudo rc-service sshd restart * Starting sshd ... [ ok ] cipi@pinky ~ $ Also, if now I log into mail I can start sshd inside, since running inside the container processes are isolated. However start-stop-daemon on the host can see all running processes inside containers, and it MUST NOT match processes by name only to check if a daemon is running or not. If that were the case start-stop-daemon is not needed at all!!! You could simply write ps -A | grep -q sshd && echo "already started" || echo "starting sshd"
I already got a duplicate for this bug: https://bugs.gentoo.org/634634
This should be fixed in the stable tree at this point. Please let me know if it isn't. Thanks, William