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

Re: DebConf-ing Apache Modules



James Bromberger wrote:
> However the option of restarting Apache after a module is upgraded 
> could perhaps be made common amongst all module packages being upgraded or 
> installed in one session. Would this be a shared template in DebConf? My 
> opionion here is we want to mini5imise the 'downtime' for the web site 
> we are running, and performing N restarts because we have a new apache, 
> new libapache-mod-ssl, new libapach-mod-perl, etc, seems a bit bothersome 
> (but perhaps unavoidable?).
> 
> Furthermore, how can we ensure that this shared question is actually asked 
> every time, and not just the initial result saved and reused on every 
> subsequent `apt-get upgrade`?  By every time, I mean once every time one 
> or more modules is upgraded, and no more than once? 

I don't see how a shared template can prevent apache from being
restarted N times. It can cut down the number of times the question is
asked to once per upgrade, perhaps, but each postinst will still need to
independantly Do The Right (idempotent, etc) Thing, and a postinst has
no way of telling if it is the last of the N postinsts, and should thus
restart apache, or not.

Likewise, while there is a way to make a shared question is asked
whenever a new package that uses it is installed and/or removed (there's
an example of this in the debconf docs), I can't think of a good way to
make a shared question be asked exactly once when any number of packages
that use it are upgraded together. It's really the same problem as
restarting apache; even though debconf can be used to tell you what
packages that share the question are installed, there is no way to know
what packages in that set are currently being upgraded, or if this is
the first or last package that is being upgraded.

I'm not sure why you think the question needs to be asked once per
upgrade anyway; forcing debconf to re-ask things is often a mistake that
can be avoided if you look at things from the right angle. But it's not
always, of course.

-- 
see shy jo



Reply to: