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

Bug#801065: Documenting how to not fail postinst on service fails to start



Steve Langasek <vorlon@debian.org> writes:

> Therefore I think it's always wrong for a package's postinst to exit 0 if:

>  - it ships a service,
>  - it is a new install or an upgrade on a system where the service was
>    previously started successfully, and
>  - the service fails to start in the postinst.

An interesting problem case is a package whose point is to run a service,
but which requires mandatory and not-automatable setup before the service
can usefully run.  After package installation, the service cannot start.
So the options are either attempt to start the service as normal in the
postinst but ignore the failure, or add some more complex logic to
postinst to attempt to determine whether the service has been set up
properly and only attempt to start the service if it has.

I think our packaging system doesn't handle this case that well.  I can
make good arguments for several possible behavior choices.  But obviously
one cannot have package installation fail because the service cannot be
started when the package has to be installed so that you can configure it
so that the service can start.

-- 
Russ Allbery (rra@debian.org)              <https://www.eyrie.org/~eagle/>


Reply to: