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

Re: Bug#904558: What should happen when maintscripts fail to restart a service



Am 07.10.18 um 20:55 schrieb Michael Biebl:
> Am 07.10.18 um 20:46 schrieb Michael Biebl:
>> Let me add here, that a lot of sysv init scripts I looked at do not
>> actually return proper error codes in case the service fails to start.
>> Picking a random example, like anacron, I see for the start action:
>>
>>     start-stop-daemon --start --exec /usr/sbin/anacron -- -s
>>     log_end_msg 0
>>
> 
> And even if the init scripts use "log_end_msg $?"
> most of them do not exit at this point but have an explicit
> "exit 0" at the end of the script [1].
> So while you get a log message on stdout which indicates failure, you
> don't get a return code which would cause dpkg to abort.
> 
> IIRC, this basically was the reason why we used "|| true" in
> dh_systemd_start to mimic the effective dh_installinit behaviour.

Or putting this a different way:
If the decision is that failure to start a service should result in a
dpkg failure, when this in turn means that most of our sysv init scripts
are insta-buggy and need to be fixed to return proper error codes.
Personally I would welcome this to be the case, but keep in mind that we
have around 1200 init scripts in the archive and afaics only very few
actually do return proper exit codes.

Regards,
Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: