On Wed, Jan 16, 2008 at 09:58:06PM +0100, Robert Felber wrote:
> On Wed, Jan 16, 2008 at 09:36:30PM +0100, Jan Wagner wrote:
> > On Wednesday 16 January 2008 20:47, Justin Piszcz wrote:
> > > Perhaps per-Robert,
> > >
> > > Make one for the cache, one for the daemon?
> > >
> > > e.g., when one 'stops' a daemon, shouldn't it kill all relevant processes
> > > it created?
> > 
> > what if anybody comes to the idea to stop the cache via initscript, but 
> > don't 
> > stop the daemon? In this case it should be ensured, that the cache is 
> > starting or is started, when the daemon starts. I guess thats most of the 
> > users are confused by 2 init scripts and will not use it in the correct way.
> > For example stoping the cache while the daemon runs or things like that.
> > 
> > I would prefer to echo a hint when stoping/restarting the daemon, how to 
> > stop 
> > the cache.
> > 
> > Any invents?
> 
> Well to avoid discussions about correctness I'd be okay if we say
> 
> rc.d/policyd-weight stop|start|restart|dstop|drestart
> 
>     stop|start|restart      - affects all (cache, daemon)
>     dstop|drestart          - affects only daemon
> 
> 
> In the end, everyone expects the cache to be killed, too.
> Those that have read an updated documentation know, that
> the daemon can also be stop/[re]started by just issuing
> /usr/sbin/policyd-weight stop|start or using the appropriate 
> init params if they are used to manage everything via init scripts.
> 
> I would count it as collateral damage if some users frequently purge
> the cache.

A 3rd option:

Upon termination the cache dumps its content to a file and re-reads
it on startup.

This would require new policyd-weight commands:

    policyd-weight [-opts ...] purge ham
    policyd-weight [-opts ...] purge spam
    policyd-weight [-opts ...] purge all
    policyd-weight [-opts ...] purge <key>

and also some disk-write/termination error-handling.
The -k switch could be removed

Pro: cache is fit also after reboot
     cache is fit after an unthought rc.d/policyd-weight stop|start
Con: not sure whether doing this gracefully is as easy as it
     sounds, dumping/reading takes some unpredictable time




-- 
    Robert Felber (PGP: 896CF30B)
    Munich, Germany

____________________________________________________________
Policyd-weight Mailinglist - http://www.policyd-weight.org/

Reply via email to