Upstart 0.5 Are We There Yet?

Michael Biebl mbiebl at gmail.com
Thu Jan 17 22:24:21 GMT 2008


2008/1/17, Scott James Remnant <scott at netsplit.com>:
> On Thu, 2008-01-17 at 12:37 +0100, Michael Biebl wrote:
>
> > 2008/1/16, Scott James Remnant <scott at netsplit.com>:
> > > On Wed, 2008-01-16 at 12:45 +0100, Michael Biebl wrote:
> > >
> > > > 2008/1/16, Scott James Remnant <scott at netsplit.com>:
> > > > > Disable a job from its definition, instead of just deleting it.
> > > > >
> > > > >         I have again become unconvinced of the usefulness of this,
> > > > >         instead favouring something more like "profiles" or "flags"
> > > > >         where jobs can be disabled and enabled en-masse.
> > > > >
> > > > >         Unless somebody can provide a use-case for having a defined job
> > > > >         that cannot be started?
> > > >
> > > >
> > > > I can only speak from my own experience. E.g. I have apache2 installed
> > > > on it, but disabled it from starting at boot (I only need it on
> > > > special occasions and then I start it manually).
> > > > It's definitely possible to achieve that with profiles or flags, I
> > > > only think it would be more effort and less convenient.
> > > >
> > > But this is different again, this isn't disabling the job since you want
> > > to be able to start it manually -- this is causing the job to ignore
> > > events; arguably you can do that already by commenting out the
> > > appropriate lines in the definition.
> >
> > This approach has some problems though:
> > 1.) It changes the md5sum of the file. This results in dpkg prompts on
> > package upgrades.
> >
> So would any method of disabling a job from its definition ;)
>
> The disabling would have to be external to the job files.
>

Correct, and it's the only sensible way imho.

Now, for the implementation, I can think of different solutions:
1.) Use symlinks and profiles/runlevel directories. Proven, rather
easy to handle. Scott doesn't like them though ;-)
2.) Use the x bit to mark if a job is disabled or not. Imho a bit
hackish. Doesn't allow more complex schemes like different
profiles/runlevels.
3.) extended attributes. Store the information if a job is
disabled/enabled (for a given profile/runlevel) using user_xattr.
Requires fs support.
4.) Define runlevels/profiles using files. Wasn't Alex hacking on this?

Cheers,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



More information about the upstart-devel mailing list