Discussion:
start-stop-daemon and lxc
(too old to reply)
Alex Mestiashvili
2014-03-24 15:20:02 UTC
Permalink
Dear dpkg maintainers,

I run into problem with s-s-d and linux-containers,
this time it is nscd init script which kills nscd daemons inside conatiners
when it is stopped on the host system.

Would it make sense to implement a check for a PPID of a process ?

that's how it looks on my system:

#ps -ef | grep nscd

UID PID PPID C STIME TTY TIME CMD
root 29214 1 0 16:03 ? 00:00:00 /usr/sbin/nscd
root 29267 10895 0 16:03 ? 00:00:00 /usr/sbin/nscd

process with ppid 1 belongs to the host system, the second is in lxc.

So if s-s-d would check by default only processes with ppid 1 and
optionally have a flag disabling this check would solve the potential
problems with init scripts.

thank you,
Alex
Guillem Jover
2014-03-24 20:50:03 UTC
Permalink
Hi!
Post by Alex Mestiashvili
I run into problem with s-s-d and linux-containers,
this time it is nscd init script which kills nscd daemons inside conatiners
when it is stopped on the host system.
The init script is buggy, the “Wait for children to finish too” code
will match any executable with that path even if running inside a
chroot/container/etc (missing a --pidfile for example, although that
would contradict the comment). But that seems to be code for when glibc
was using LinuxThreads and each thread was on its own PID, not now
with the new NPTL. It probably needs to be reevaluated, and possibly
dropped entirely, although maybe there's another reason for that check.
Post by Alex Mestiashvili
Would it make sense to implement a check for a PPID of a process ?
Independently of the above, such a new matching option (--ppid) might
be useful in general, so I guess I could add something like that, yes.
I've added a note to add it for either 1.17.7 or 1.17.8.

Thanks,
Guillem
--
To UNSUBSCRIBE, email to debian-dpkg-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: https://lists.debian.org/***@gaara.hadrons.org
Loading...