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

Bug#571280: false positive for "init.d-script-missing-dependency-on-remote_fs /etc/init.d/rsyslog: required-stop"



On 21.03.2010 00:37, Russ Allbery wrote:
> Michael Biebl <biebl@debian.org> writes:
> 
>> the rsyslog init script has the following LSB header
> 
>> ### BEGIN INIT INFO
>> # Provides:          rsyslog
>> # Required-Start:    $remote_fs $time
>> # Required-Stop:     umountnfs $time
>> # X-Stop-After:      sendsigs
>> # Default-Start:     2 3 4 5
>> # Default-Stop:      0 1 6
>> # Short-Description: enhanced syslogd
>> # Description:       Rsyslog is an enhanced multi-threaded syslogd.
>> #                    It is quite compatible to stock sysklogd and can
>> #                    be»
>> #                    used as a drop-in replacement.
>> ### END INIT INFO
> 
>> The 
>> # Required-Stop:     umountnfs $time
>> # X-Stop-After:      sendsigs
> 
>> statements, ensure, that rsyslog is stopped as late as possible during
>> shut down so it can collect log messages as long as possible.
>> I uses the sendsigs_omit feature to ensure that it is not killed by the
>> sendsigs init script in 0/6.
> 
>> Afaics the LSB header of rsyslog is correct and the following error
>> message by lintian, a false positive:
> 
>> E: rsyslog: init.d-script-missing-dependency-on-remote_fs
>> /etc/init.d/rsyslog: required-stop
> 
> What the script is triggering off of in this case is that you're starting
> a daemon that lives in /usr/sbin but you're saying /usr can be unmounted
> before the daemon is stopped.  Since the running rsyslogd process has an
> open file descriptor for the /usr/sbin/rsyslogd binary, I believe /usr
> could not be unmounted while it was still running, although I haven't
> tested.  I think it has to be stopped before $remote_fs can be stopped in
> the general case.
> 
> Incidentally, you're also saying that /var ($local_fs) can be unmounted
> before rsyslogd is stopped, which similarly probably isn't going to work
> since, at least in the default configuration, rsyslogd is holding a bunch
> of open file descriptors in /var/log.
> 

I don't think your analysis is correct.

The rsyslog header has a
Required-Stop:     umountnfs
i.e. it is stopped before umountnfs.
As /usr can be a remote fs in Debian, this means, rsyslog is stopped
before /usr (or for that matter /var) is unmounted (fwiw the rsyslog LSB
header wouldn't be correct, I certainly would have gotten a bug report
until now :-) )

What the rsyslog init script does though, is using the sendsigs omit
interface, to not be killed by the sendsigs init scripts, so it can run
longer during shutdown.

I'm not quite sure where you see me saying that /usr or /var could be
unmounted while rsyslogd is still running?

Cheers,
Michael


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: