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

Re: Objections to #156161?



On Mon, 2003-08-25 at 16:24, Henrique de Moraes Holschuh wrote:
> It is up to the administrator to understand that this will break upgrades
> in weird ways if a service absolutely HAS to be restarted, since that
> restart will simply not happen.

Yes, restart will not happen if the current runlevel lacks rc
symlinks for the service.  (Currently the restart _will_ happen
if thre are no such symlinks.)

There are two kinds of services that may lack rc symlinks in the
current runlevel: (1) services that have an rc symlink in runlevel
S and (2) services that _don't_ have an rc symlink in runlevel S.

In case #1 one generally doesn't want the "service" to be restarted
anyway because it is an initscript that is meant to run only at boot
time.  It was to work around the current invoke-rc.d behavior that
a "--no-start" option was added to dh_installinit -- it keeps the
debhelper-created postinst from doing "invoke-rc.d foo start".
If in the future invoke-rc.d doesn't start services in runlevels
that lack start symlinks then the --no-start kludge won't be
necessary.  On the other hand, there will a problem with any
package that relies on the current behavior of invoke-rc.d to
run an initscript on install that is configured to run only in
runlevel S.  The solution for such a package would be to do
"invoke-rc.d --force foo start" in the postinst on non-upgrade.

In case #2 the maintainer or the admin is relying on behavior
that isn't currently defined.

>   There is no clean fix until we get all
> initcripts to properly support the new LSB-introduced (and many times
> requested within Debian)
        (Yes, see #203239)
>  equivalent to "restart only if it is already
> running".  At that time, it is very simple to fix invoke-rc.d to be
> a bit more intelligent.

Yes, if initscripts supported try-restart then it could become
standard practice to do try-restart instead of restart on package
upgrade.  Upgrading a package shouldn't change the state of any
services (running versus stopped).

In the meantime, however, "invoke-rc.d foo restart" will still
restart all services that don't fall into one of the cases
described above, and of those above only a small number will be
adversely affected, and even then the worst that will happen is
that the service won't be restarted right away.

Nevertheless, this is something that should be implemented
post-sarge.
--
Thomas



Reply to: