Situation: I'm running containers via LXC, they have their own IP address and do not share any filesystem with the host. When trying to start sshd on the host, /etc/init.d/sshd refuses to start because start-stop-daemon believes sshd to be already running. /run/sshd.pid does not exist, neither does /run/openrc/started/sshd. /var/run is a symlink to /run. This can easily be reproduced with "start-stop-daemon --start --exec /usr/sbin/sshd --pidfile /run/nonexistent". Stopping sshd in the containers makes the problem go away, but this is no solution of course. Manually running sshd via "/usr/bin/sshd" works fine. Not sure if it matters, but the container still runs openrc 0.28 Reproducible: Always Steps to Reproduce: 1. Create and start LXC containers with sshd enabled 2. Try to start sshd on the host Actual Results: "start-stop-daemon: /usr/sbin/sshd is already running" Expected Results: Start sshd The containers are still on sys-apps/openrc-0.28
Same behavior for samba and vixie-cron
I also reported this as https://bugs.gentoo.org/634362. I guess this changes the status to CONFIRMED
As a workaround, I've changed my boot order to start sshd on the host before any LXC containers are started.
Created attachment 499594 [details, diff] 0001-rc_find_pids-skip-pids-in-different-pid-namespaces.patch Hi, can you please apply this patch and let me know if it fixes your issue? only consider pids that share our pid namespace.
Thanks for the patch. I will test it as soon as possible, but these computers are headless so setting everything up will take a while.
Hello, I gave the patch a try and everything seems OK.
The patch is applied in the following commit and will be in 0.34. https://github.com/openrc/openrc/commit/f5acc66db7d1a0bfad6a40eefc0240b80f52df94
I just merged sys-apps/openrc-0.34.2 and everything is working as expected. Many thanks for the quick fix!