Dependencies
Sean E. Russell
upstart at ser1.net
Sun Oct 8 16:43:52 BST 2006
On Sunday 08 October 2006 11:02, you wrote:
> > Well, Cups was just an example. The Gentoo init scripts are full of
> > examples of services which have conditional requirements. The idea is
> > that there's a mechanism for saying "if this service is going to be
> > started, then wait for it to start. Otherwise, just start now."
>
> Could be an interesting problem mapping to an event-driven scenario, how
> do you know that a service is "going to be started later" ?
You've got a good point. Since Upstart is an indeterminate system, it is
possible that a service could be available, but never started because the
correct event (network/started, say) was never generated.
There are three cases I can think of:
0) A job doesn't exist. This is the simple case -- if there's no job
in /etc/events.d and another job has it as a conditional dependency, then
Upstart simply removes the dependency.
1) A job fails to start (say, network) and generates a job-failed event. In
this case, Upstart would "satisfy" the requirement if it is conditional.
2) A job goes into a perpetual "wait" state. The only way these could be
handled is by time-out, but that's a really bad solution.
#2 is the show-stopper, and may be sufficient to prove that Upstart (or any
event-driven design) can't be made handle conditional dependencies without
ugly hacks (timeouts).
Finally, would somebody with write access to the main Upstart page please add
this link to the page? I keep losing it:
https://wiki.ubuntu.com/UpstartDesignChanges
--
### SER
### Deutsch|Esperanto|Francaise|Linux|XML|Java|Ruby|Aikido|Iaido
### http://www.ser1.net jabber.com:ser ICQ:83578737
### GPG: http://www.ser1.net/Security/ser_public.gpg
More information about the Upstart-devel
mailing list