Slight, maybe problem.
Jerry Haltom
wasabi at larvalstage.net
Mon Nov 13 21:34:13 GMT 2006
Ahh hah. That cleared it up. I had mistakenly concluded that "with foo"
would be an alias for "from foo started until foo stopping", which is
not the case. "with" being a mirroring of goals fixes this.
On the other hand also, I realized even if with was just an alias for
"from foo started until foo stopping", it's not a big deal. The service
should see if it can start after being installed anyways. Who cares if
it's events aren't "filled in".
On Mon, 2006-11-13 at 12:29 -0800, Scott James Remnant wrote:
> On Mon, 2006-11-13 at 21:13 +0100, Luka Renko wrote:
>
> > On Monday 13 November 2006 03:53, Jerry Haltom wrote:
> > > Since our event match tree is created when Upstart learns of a job, it
> > > is only filled in from then on. If a new job is added, such as
> > > installing Apache, the Apache job will be learned, but it will have
> > > never heard from "network-up", and thus will be waiting for the network
> > > to come up.
> >
> > This is exactly what was discussed on upstart BOF in MtView: for "and"
> > conditions, we need to keep the state of event and evaluate the complete
> > condition on every change of state (or better event). In your example, newly
> > registered job (apache) would evaluate conditon of network-up that would be
> > cached in upstart.
> >
> The obvious problem here is that upstart would have to cache whether an
> event has happened or not. And while this is suitable for "from
> network-up until network-down" stanzas, this would not be suitable for
> "on control-alt-delete"
>
> Also there's a majorly obvious problem...
>
> while true; do
> initctl emit `uuidgen`
> done
>
> upstart will consume all available memory.
>
>
> My inclination is that this is mostly necessary for those combinations
> that indicate states, e.g.
>
> from fhs-up until fhs-down and network-up until network-down
>
> That can be placed in /etc/event.d/multi-user ... then other jobs can
> refer directly to it:
>
> with multi-user
>
> This refer could be deliberately stateful, and non-event like, so that
> it a mirroring of goals, rather than just an event trigger.
>
> Scott
> _______________________________________________
> upstart-devel mailing list
> upstart-devel at lists.netsplit.com
> http://lists.netsplit.com/mailman/listinfo/upstart-devel
More information about the Upstart-devel
mailing list