/srv/irclogs.ubuntu.com/2013/10/31/#upstart.txt

tseliothi all, if I used a symlink in /etc/init to the actual job in, say, /usr/share/$package_name, would upstart follow the symlink and start the job properly? Note: this is a hack and I know it wouldn't be good practice11:25
tseliotand shall I expect any issues with this?11:26
xnoxtseliot: no, it will not work. Upstart ignores all symlinks.11:28
tseliotxnox: ok, thanks11:28
xnoxtseliot: so your symlinked name will not be picked up.11:28
tseliotright11:28
xnoxtseliot: if you have "one job which should have similar instances which are tiny bit variable" maybe you need an instance job.11:28
xnoxtseliot: what is it for?11:28
xnoxtseliot: e.g. see /etc/init/network-interface.conf where one job instance per network interface is started.11:29
tseliotxnox: well, the nvidia flavours in Precise can be installed at the same time and I need them to install the same job. It's not an issue in Saucy (where they are not coinstallable) but I'm trying not to have a big diff between the different versions that I ship in the different ubuntu releases11:31
xnoxtseliot: i see =/ if it helps you can put jobs into sub-directories under /etc/init/11:31
xnoxtseliot: but don't forget to think about the dist-upgrade case from precise -> trusty =/ with all of those hwe stacks.11:32
tseliotxnox: yep, that's something I'll have to test11:33
tseliotxnox: if I have jobs with different names,  can I make sure only one of them can run?11:35
tseliotxnox: so that if one is running the others won't11:35
xnoxtseliot: you'd need to add a pre-start in the one which should not be running. In that pre-start check the output of e.g. "initctl status goodjobname" and if there is better one do { stop; exit 0; }11:37
xnoxtseliot: let me fetch an example from cookbook.11:37
xnoxtseliot: supporting "states" is often requested feature which hasn't been implemented yet.11:37
xnoxtseliot: hm, I see mutual exclusion in the cookbook. The "bad" job can have "stop on starting goodone", this way whenever good one tries to start the bad one will be stopped first.11:42
xnoxtseliot: or "pre-start exec ! status goodjob"11:43
tseliotxnox: right. Except that there's probably no such thing as the good one and it would be a matter of having whatever starts first prevent other jobs of the same kind from running11:44
xnoxif goodone exists, status will exit with 0, ! will invert it, thus pre-start will exit with 1 and prevent the "badjob" from running.11:44
xnoxtseliot: oh, so it's many2many and only one should run?11:44
tseliotxnox: yep. All the jobs will be the same11:45
tseliotit's just a matter of having only one running11:45
xnoxtseliot: can I see them? where are they?11:45
xnox(cause one would not want to encode the names of all of them in each and everyone of them)11:45
tseliotxnox: they are not there yet. I'll pastebin one11:46
xnoxtseliot: i think i missed pastebin.11:46
xnoxtseliot: =) oh you haven't yet.11:46
tseliotxnox: something like this http://paste.ubuntu.com/6335293/11:46
tseliotdon't mind the __USER__ thing, it's a template11:47
xnoxtseliot: ship that job in a common package which the rest of the packages depend on?11:47
xnoxtseliot: and you can source __USER__ from a config file, if there are different users.11:48
tseliotxnox: I tried but it got stuck in NEW and was rejected when Saucy was released... I was hoping to get around it11:48
xnoxtseliot: well talk to archive admins. that looks like the cleanest solution, imho.11:48
tseliotxnox: yes, it is. I'll try again getting the package into the archive11:49
tseliotthanks for your help11:49
xnoxtseliot: you can even ship that job anywhere else, e.g. in x11-common or some such, just add a check "pre-start [ ! -x /usr/bin/nvidia-persistance ] && { stop; exit 0; }"11:50
xnoxtseliot: it's nice to have in the same package(s) that ship nvidia-persistance binary, but you don't have to.11:50
tseliotright11:50
xnox(apart from making sure postinst scripts attempt to start it)11:50
xnoxtseliot: yeah, just talk to archive-admins about it. Or upload with a bug # in the changelog, and in that bug explain what the problem is, mark all affected packages and explain how you solved it and subscribe archive admins.11:51
tseliotxnox: yes, I'll try with Trusty first11:52
xnoxtseliot: i think rejection was not "reviewed and rejected the package", but rather "it's release day, step X/N to release is to rejected all new packages", as there is no simple way to redirect new queue to the next series.11:52
xnoxwhich didn't get time to be reviewed.11:52
tseliotxnox: yes, the package was reviewed a first time, then I made the required changes but it was never reviewed again11:53
crankharderjodh: I was unable to reproduce that issue yesterday on a clean system - thanks for all the troubleshooting help yesterday anyways :)13:39

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!