[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#652575: rsyslog: /etc/init.d/rsyslog modifications for GNU/Hurd


On Fri, 2012-04-06 at 10:09:01 +0200, Michael Biebl wrote:
> On 27.01.2012 10:18, Guillem Jover wrote:
> >>  * rsyslog should probably switch to use s-s-d --exec instead (why is
> >>    it using --name anyway? that option has always been more unreliable).
> > 
> > Still pending.
> Upon your recommendation, I've switched stop() to "s-s-d --pidfile
> /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd",


> but I've run into a problem on *kfreebsd* now:
> To minimise downtime during upgrades, I restart rsyslogd in postinst,
> rather then stop in prerm/start in postinst.
> But s-s-d doesn't like it apparently when the binary is replaced during
> upgrades (seen during a squeeze → wheezy test upgrade)
> s-s-d --stop --pidfile /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
> No /usr/sbin/rsyslogd found running, none killed.
> But rsyslogd is running, and when I do
> ls -la /proc/$(cat /var/run/rsyslogd.pid)/exe
> # /proc/324/exec -> unknown
> I don't see this behaviour on Linux. Is this a bug / special behaviour
> on kfreebsd?
> What are daemons that use restart-in-postinst supposed to use? I'm
> inclined to switch back to --name, as I don't remember seeing such a
> problem with --name. But I'd like to hear your opinion first.

Yes I noticed this while fixing the code for 1.16.2, but didn't have
time to test the fix I had come up with. This is a behaviour from at
least linprocfs (ISTR it affects the native procfs too though). At
least for GNU/kFreeBSD and FreeBSD the fix is to use the sysctl
KERN_PROC_PATHNAME op so that we get the exec pathname, which should
allow replacing files correctly. It will also make s-s-d not depend
on procfs on those systems.

So this is something that should be fixed in s-s-d, I can propose
this fix for a stable update, but users upgrading are not guaranteed
to have updated to those. In any case GNU/kFreeBSD has been a tech
preview thing, so personally I don't see much problem with making
rsyslogd use --exec anyway, which will be always working fine there
after wheezy.


Reply to: