Upstart helpers (abstract jobs and event aliases) for Oneiric

Marc - A. Dahlhaus mad at wol.de
Wed Jun 8 16:04:05 UTC 2011


Hi Evan,

Am Mittwoch, den 08.06.2011, 10:09 -0400 schrieb Evan Huus:
> I've been following this thread for a bit now, and I was just struck
> by a similarity between some of the proposed solutions and Java
> Interfaces (yes, I know).
> 
> A lot of the proposals based on Option 1 or an alias keyword are
> basically saying that we need a way to say
> 
> (for gdm)
> implements display-manager
> 
> (for ufw)
> implements firewall
> 
> 'Alias' is a fair bit broader than we would need.

I used the word 'alias' because by setting it, upstart would send events
with JOB=job-name and also JOB=alias-value in starting, started,
stopping and stopped events.

That way you can simply hock other jobs to "start on started
display-manager" and don't have to hardcode any given provider for
"display-manager". 

> That way of thinking seems most coherent to me, and it makes for very
> nice syntax if you try "start display-manager" with multiple
> installed.
> 
> > start display-manager
> Multiple jobs found which implement display-manager:
>  1) gdm
>  2) xdm
> ...
> 
> Thoughts?

The select is nice but do we need it in the first place?

IMO a display-manager or firewall will be used mutually exclusive.

We don't have to chose between providers as only one of them should be
active at any given time in the first place. Anything other is a bug as
it would simply not work to use two firewall or display-manager
implementations at the same time. Upstart would let the jobs for them
race on resources in a way that the faster one wins and the slower will
error out if it would be the case that two jobs for a given "Common
Service" are active.

I'll try to implement it over the next weekend and test if it works out
as expected...

> Evan

thanks,

Marc






More information about the upstart-devel mailing list