[Pkg-zope-developers] Bug#378364: zope-common: upgrades restart all instances, not just those in /etc/default/zope*

Ross Boylan ross at betterworld.us
Sun Jul 16 21:59:47 UTC 2006


On Sun, Jul 16, 2006 at 10:13:35PM +0200, Fabio Tranchitella wrote:
> Il giorno sab, 15/07/2006 alle 10.13 -0700, Ross Boylan ha scritto:
> > Package: zope-common
> > Version: 0.5.24
> > Severity: normal
> > 
> > When I upgrade, all zope instances are restarted, despite the fact
> > that (for example) my /etc/default/zope3 includes
> >   INSTANCES="upj"
> 
> /etc/default/zope3 does control only /etc/init.d/zope3 and not the
> actions performed by the maintainer scripts, which use dzhandle
> directly.
> 
> When a product is upgraded, dzhandle tries to restart all the instances
> which are affected by the update **and** have "configuring" or "end"
> restart policy. This means that if your instance is stopped, then
> dzhandle tries to start it unless you use "manually" as restart policy.
> 
> Please, modify your /etc/zope3/sandbox/debian_policy setting
> "Restart-Policy: manually": this will prevent the restart of your
> instance on upgrade.

I looked through the documents for zope-common and zope3 and found
very little about Restart-Policy.  zope-common/Readme.Debian.gz says
--------------------------------------------------------------------
Restart-Policy describes how instances are restarted during configuration.

An instance, which should be restarted on system start, has to be mentioned
in /etc/default/zope<version>.
-----------------------------------------------------------------

and man dzhandle mentions options to set the policy.  Neither mentions
what the values are that can be set, not what they do. Your message
touches on that, but is there something more?

Second, more basically, I don't see why there are these two separate
treatments of start/restart, one in debian_policy and one in
/etc/default/.  That is, I understand that one governs system startup
and the other governs upgrades, but I don't understand why a
distinction should be made between the two.

If I understand you, the upgrade process does not respect the runlevel
either, so if you upgrade in a runlevel that should not be running
zope, you will still get zope running.  Is that even policy-compliant?
Policy says

-------------------------------------------------------
9.3.3.2 Running initscripts

The program invoke-rc.d is provided to make it easier for package
maintainers to properly invoke an initscript, obeying runlevel and
other locally-defined constraints that might limit a package's right
to start, stop and otherwise manage services. This program may be used
by maintainers in their packages' scripts.

The program must use invoke-rc.d to invoke the /etc/init.d/*
initscripts, instead of calling them directly.  
---------------------------------------------------------------
It seems to me the current behavior runs afoul of the limitations
implicit in "constraints that might limit a package's right to start,
stop, and otherwise manage services."  It also seems to me the direct
invocation of dzhandle is about the same as the (prohibited) practice
of calling the init script directly, since the init script invokes
dzhandle.

Note that although altering debian_policy can bring instance restart
behavior in line with /etc/default, it can not bring it in line with
the runlevel behavior (which is variable).


...
> I think this is not a bug, and you can disable this behaviour as
> explained above. I'm closing the report, but feel free to re-open it if
> you do not agree and/or have a better idea/implementation.

The behavior continues to seem undesirable for me, and I see a number
of problem areas:
1) upgrades respecting runlevel
2) upgrades respecting instance selection in /etc/default/
3) documentation.

I may have misunderstood or missed something, however.

Ross




More information about the Pkg-zope-developers mailing list