El Sun, 20 Apr 2008 18:20:00 +0100 Ian Lee <[EMAIL PROTECTED]> escribió:
> Ricardo Garcia wrote: > > I don't think (IMHO) that a dependency restart event should be > > necessary, just dependency stopped, because that's where the > > restarting problem comes - dependant services always auto-restart > > when their dependencies go down, so what we want is simply to stop > > that from happening, right? Unless we do want to take some other > > action when a dependency restarts. But let's assume that the user > > wants to shut it down, prepare some stuff and then start it again. > > Thats not restarting(as initng sees it) a service, thats manually > stopping and starting a service with two ngc commands > > > For that case, a service should just shut down and restart (which > > would lead to "WAITING_FOR_DEPS" status) when a dependency is shut > > down (unless of course the flags discussed in here are set). When it > > restarts, everything is handled automatically. So, is there really a > > need for a restart event? Can we find a practical example for it? > > Currently there is a STATE_CHANGE_EVENT whenever the service state > changes, there are no restart states. I've been adding these states, > which has altered the way initng process restarting events, Iv'e been > moving it into the service plugin to follow the start/stop routines > > So a restarting service will be in the states > > RESTART_MARKED -> WAITING_FOR_RESTART_DEPS -> > SERVICE_RESTART_DEPS_MET ->SERVICE_STOPPED_FOR_RESTARTING > > > WAITING_FOR_RESTART_DEPS - is when dependents are stopped (as per > script variables) > SERVICE_STOPPED_FOR_RESTARTING - is when service is restarted > We should be able to decide to propagate the event or not. Most of the time it's not relevant when a service restarts... -- Ismael Luceno
signature.asc
Description: PGP signature
-- _______________________________________________ Initng mailing list [email protected] http://jw.dyndns.org/mailman/listinfo/initng
