Tollef Fog Heen writes ("Bug#904558: What should happen when maintscripts fail 
to restart  a service"):
> Ian Jackson:
> > There may be good reasons not to treat daemon startup failure as a
> > postinst failure, but the argument above is not one of them.
> 
> I think this is the core question.  I largely agree with Ian here that
> having postinsts fail is not that big a deal if they can't make forward
> progress, but also we're being asked to advice on what happens when a
> maintainer script fails to restart a service.  I disagree with him on
> whether failure to start/restart a service should be considered a
> configuration failure.

I think whether it is a configuration failure depends on ...

> I think the general rule should be that the success/failure of the
> postinst script should signal whether the package considers itself ready
> to provide whatever API it exists to provide (disregarding the case of
> Essential packages here, since those are special).

... that.  I think I'm in agreement with you on that.  But ...

> This means that failure to start a daemon should generally not cause the
> postinst to fail.

... I disagree with that.  I think that in the usual case, if the
daemon is broken, and the package's purpose is to provide that daemon
service, then the package probably isn't providing its API.

Maybe part of the difficulty we are having with this conversation is
that we are lacking in examples.  This bug and the "parents" #780403
and #802501 are all entirely abstract.

Would someone care to give some examples of packages which with both
behaviours ?


Also:

> The API provided by a package being in the configured state is not
> whether the relevant daemon is running or not; that is runtime and can
> and will change many times while the package is in the configured state,
> so dpkg dependencies are not useful for expressing "this service must be
> running".

I disagree with this.

dpkg dependencies are not just about what sets of packages can be
coinstalled.  They also imply sequencing of package setup.  And since
starting daemons is part of package setup, dpkg dependencies imply a
sequencing of daemon startup.

That is actually necessary in the case where the startup of daemon B
can only successfully completed if daemon A is up,

>  (There's also the case where the service is running on a
> separate host, which is often the case for services such as databases
> and where the use of Depends is inappropriate.)

In that case, there would be a Recommends or Suggests instead, I would
have thought.

Thanks,
Ian.

-- 
Ian Jackson <ijack...@chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply via email to