/srv/irclogs.ubuntu.com/2013/04/09/#upstart.txt

brendandjodh, we want to run our test tool as soon as the system is ready to be tested. what that actually means may need discussion. i don't know that much about upstart10:26
jodhbrendand: ok, well you need to know what environment your test tool needs to run in.10:27
jodhbrendand: 'start on runlevel [2345]' is generally appropriate for jobs that need to run when disks are mounted and networks are up.10:27
brendandjodh, we do - but how to express that in upstart terms is beyond me at the moment10:27
jodhbrendand: so what does your test tool need before it can run?10:28
brendandjodh, the best way to describe it would be to say that we should start testing when all initialisation that's going to happen has happened10:28
jodhbrendand: what does the test tool test?10:29
brendandjodh, well we're testing hardware so all services that interact with hardware need to be started10:29
jodhbrendand: can you give examples of such h/w services that you care about?10:29
brendandnetworking10:29
brendandusb10:29
zygajodh: we talk to network manager, udisks, poke udev10:30
brendandzyga, actually on servers we don't touch NM10:30
zygabrendand: perhaps this also implies our jobs should be able to depend on upstart stuff being started? that would remove the requirement from plainbox itself and offset it to other parts of the system10:30
brendandjodh, on desktop systems we are just using xdg autostart to start after login10:31
brendandjodh, so we're thinking only about servers here10:31
zygabrendand: we could perhaps use upstart for that as well, without user sessions (jodh: we need to support precise +)10:31
jodhbrendand: I'd go for the runlevel 'start on' then since nm isn't going to be available on the server.10:36
zygajodh: meta-question, do you think backporting current upstart to precise would be a good idea? 10:37
brendandjodh, http://upstart.ubuntu.com/cookbook/#normal-start seems to imply that using the runlevel start on would mean that you are okay with the service starting without a valid network interface10:37
jodhbrendand: please just try the runlevel start on. I'll tweak the cookbook when I'm less busy ;)10:39
* brendand is reading https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/70157610:39
jodhzyga: why?10:39
zygajodh: so that stuff that targets 12.04 can take advantage of new features and can rely on stuff that upstart is good at10:39
jodhzyga: doesn't that argument apply to most packages in Ubuntu though?10:41
zygajodh: yes but web apps typically sidestep normal packaging already10:42
zygajodh: yet depend on upstart for getting started 10:42
jodhzyga: upstart in precise works perfectly well. I don't understand your argument.10:43
zygajodh: perhaps I miss something, let me explain that10:44
zygajodh: I was looking for setgit/setuid but apparently those are in precise by now10:45
zygajodh: I must have confused that with lucid10:45
zygasetgid10:46
jodhzyga: ok. You can compare 'rmadison upstart' with http://upstart.ubuntu.com/cookbook/#stanzas-by-category10:49
fabiant7tIs it possible for a service to stop itself and prevent further respawns for the current upstart session?14:39
fabiant7tMy use case is to shut down a client service whose server (another system) rejected communication. The client exits but respawns immediately due to upstart.14:41
xnoxfabiant7t: respawn can have limits, such that it will stop respawning.14:46
fabiant7txnox: thx! I'll try to add a respawn limit to the upstart job15:01
xnoxfabiant7t: http://upstart.ubuntu.com/cookbook/#respawn-limit15:04
fabiant7txbox: Jap, I'm reading through it, just need to find the right place to apply it on saltstacks generic upstart job script (http://dpaste.com/1052456/)15:05
SpamapSfabiant7t: if the service exits with a normal exit, no respawn will ocurr15:16
SpamapSfabiant7t: so just exit(0)15:16
fabiant7tSpamapS: I tested that with sys.exit(0) in python, but it got respawned15:17
SpamapSfabiant7t: something went wrong then15:17
SpamapSfabiant7t: is it being run by a wrapper script that maybe doesn't exit cleanly?15:17
fabiant7tSpamapS: As far as I can tell (and read in the logs), it did exit property with a return code 015:19
fabiant7tSpamapS: I'm trying to fix that issue here, btw: https://github.com/saltstack/salt/issues/441115:20
SpamapSfabiant7t: oh I misunderstood actually15:20
SpamapSonly tasks can exit 0 to avoid respawn15:20
SpamapSfabiant7t: to make non-tasks behave the same way you have to add 'normal exit 0'15:21
fabiant7tSpamapS: It's a system service, and it's running into a deadlock right now15:21
fabiant7tSpamapS: to this script? http://dpaste.com/1052456/15:22
fabiant7tI am pretty unfamiliar with upstart and the startup scripts, unfortunately :(15:23
SpamapSfabiant7t: oh thats a sysvinit. Wha?15:23
fabiant7tobviously it got automatically rewritten to upstart15:23
SpamapSfabiant7t: wait no, ignore that script15:24
SpamapSfabiant7t: /etc/init/$that_scripts_name.conf15:24
fabiant7tSpamapS: aaah, got it15:25
fabiant7tSpamapS: That fixes the loop, thanks a lot!15:30

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