Upstart config file generation

Jan Ceuleers jan.ceuleers at computer.org
Sun May 1 17:48:14 UTC 2011


Hi there.

I'd like to pick your brains, if I may. There are applications whose 
dependencies on hardware and other applications depend on their 
configuration. This means that it is not possible for packagers of these 
applications to provide a generic upstart configuration file.

Two possibilities for dealing with this: we either regard those 
applications as broken, or we should create a framework (or at least 
some features) enabling applications or packager glue scripts to 
generate upstart configuration files.

It's perhaps easier to discuss this if I provide an example. The backend 
part of MythTV [1] has at least two kinds of dependencies which depend 
on its own configuration: tuners (i.e. video capture devices) and mysql.

If the backend starts before the tuners are fully initialised (which can 
take a long time, with firmware loading, oscillator calibration and 
whatnot) it will, as of version 0.24, start OK except that it won't be 
able to make any recordings. So it won't fail to start, and there won't 
be any opportunity for upstart to retry starting it. Please refer to [2] 
for a discussion of what is needed in the start on stanza in order to 
cater for this.

If the backend starts before mysql is available then it will fail, and 
upstart does have an opportunity to retry. No harm done then. Not ideal 
either, because this attempt will have needlessly slowed the boot 
procedure down. So why not put the dependency in the default (and 
static) upstart configuration file? Because in the general case the 
database need not reside on the same server as the backend (e.g. in the 
case of a slave backend).

So what do you think: are applications that require (or would benefit 
from) generated upstart config files broken, or should something be done 
about this? In the latter case, is this something that upstart should 
(help) solve, or should it be left wholly to other tools to address? Or 
is it just not that important a problem?

[1]: http://www.mythtv.org
[2]: http://www.mythtv.org/wiki/Upstart_mythbackend_Configuration

Thanks, Jan



More information about the upstart-devel mailing list