[11:29] <trondm> Hi. I have an upstart job that emits an event. How can I get a different upstart job to restart when this event is emitted?
[11:30] <jodh> trondm: creating a 3rd upstart job that specifies "start on some-event" and then "exec restart some-job" would do it.
[11:32] <trondm> OK. Thanks.
[13:54] <glenn___> Afternoon
[13:55] <glenn___> Ive been working on precise for some days now, and im noticing that a lot of software doesnt have upstart scripts
[13:55] <glenn___> What exactly are the guide lines on this?
[13:56] <glenn___> Will each software package in precise come with upstart scripts?
[13:56] <jodh> glenn___: we want to migrate SysV services to Upstart. See https://blueprints.launchpad.net/ubuntu/+spec/foundations-p-upstart-convert-main-initd-to-jobs
[13:56] <glenn___> jodh: im trying to implement puppet
[13:57] <glenn___> im having lots of troubles with init.d scripts, or non existent upstart scripts
[13:57] <glenn___> fail2ban is not correct, postgresql fails
[13:57] <glenn___> jodh: can I add software on that list?
[13:57] <jodh> glenn___: Due to the number of packages available (incl. universe, multiverse, etc), we need help to work on this migration.
[13:58] <glenn___> jodh: id be happy to help out with this
[13:59] <jodh> glenn___: your help would be much appreciated; a lot of problems we see on Ubuntu come from SysV services (or the _interaction_ between SysV services and Upstart jobs). Life would be a lot simpler and safer if all the services were converted to Upstart jobs IMHO.
[13:59] <glenn___> jodh: is it correct to say that if a good upstart job exists, all the /etc/rc* and /etc/init.d/ can be deleted safely?
[13:59] <glenn___> for that package
[13:59] <glenn___> jodh: im currently only seeing mysql and ssh in upstart for the software we support
[14:00] <glenn___> jodh: my biggest issue is that even the sysv scripts are not working properly, i.e. status will give the wrong exit code
[14:01] <jodh> "yes", atleast for Ubuntu, but the init.d scripts won't go away - they will still exist in debian. Added to which, when debian gets a current version of Upstart and the associated tooling support, the plan is to make the Ubuntu upstart jobs available in debian (since at that stage, debian will support multiple init systems).
[14:01] <jodh> glenn___: please raise bugs if you find them.
[14:02] <glenn___> jodh: what exactly is the way to go if i wanted to add an upstart script to a software package? 
[14:03] <jodh> glenn___: you need to add a debian/<package>.upstart file.
[14:04] <glenn___> jodh: i never did work on packages before, hence my question :)
[14:04] <jodh> glenn___: I'd strongly recommend you read this first then: https://wiki.ubuntu.com/PackagingGuide/Complete
[14:06] <glenn___> jodh: im only interested in the upstart scripts
[14:06] <jodh> glenn___: although nominally as simple as creating that one file, it takes a lot of effort to test the package and to ensure you've written the upstart job correctly.
[14:06] <glenn___> jodh: why dont package maintainers make the upstart scripts themselves?
[14:06] <jodh> glenn___: ok, if you'd like to contribute some upstart conf files that would be great.
[14:06] <jodh> glenn___: they do (?)
[14:07] <glenn___> yeah
[14:07] <glenn___> people just created packages without upstart scripts
[14:07] <glenn___> its weird to me
[14:07] <glenn___> or failing sysv scripts regarding the exit code
[14:08] <jodh> glenn___: remember that a large number of ubuntu packages originate in debian - where upstart support is poor currently. Hence, there is currently little incentive for debian devs to create the upstart file as that wouldn't (couldn't really) be used in debian (currently).
[14:08] <glenn___> upstart in precise: fail2ban, postgresql, puppet, varnishd, haproxy, denyhosts
[14:09] <glenn___> jodh: oh ic
[14:09] <jodh> glenn___: if you've found a bug with a failing sysv init script, please raise it providing as many details as you can.
[14:09] <glenn___> jodh: that explains a lot
[14:09] <glenn___> jodh: people arent really pushed towards creating upstart scripts in debian yet :)
[14:10] <jodh> glenn___: we are trying to address these issues though. any help you can provide would be very valuable to debian+ubuntu.
[14:10] <glenn___> jodh: so if i would create an upstart script for a package, i would actually have to create the package myself ?
[14:11] <jodh> glenn___: no, but as you can see from the size of that packaging document, there is a lot of detail and process to understand before you can make changes to a package.
[14:11] <glenn___> jodh: yeah its very big
[14:12] <glenn___> jodh: but the upstart scripts seems pretty evident to me.. just 1 file in /etc/init 
[14:12] <glenn___> jodh: at least, thats how i fix it now while testing precise
[14:13] <glenn___> jodh: to be honest, it is not really easy to get an upstart script into a package :)
[14:13] <glenn___> at least, thats how it looks te me
[14:14] <jodh> glenn___: if you have manually converted a sysv job to an upstart .conf file, please raise a bug on the ubuntu package, attach your config and we'll review it and get it added to the package if possible.
[14:14] <jodh> glenn___: if you haven't already seen it: http://upstart.ubuntu.com/cookbook/#how-to-establish-a-jobs-start-on-and-stop-on-conditions
[14:16] <jodh> glenn___: testing is extremely important though - creating the .conf file is the first step. But testing is required to ensure it will work in all runlevels, if certain packages are not installed, etc.
[14:19] <glenn___> jodh: so if correct, if i would have a upstart script, i could raise a bug on that package with my config in it?
[14:19] <glenn___> jodh: and in regard to ubuntu versions, like LTS (lucid, precise), can they have the same upstart script?
[14:20] <jodh> glenn___: yes - someone else with packaging experience can then add it to the appropriate package and test it.
[14:20] <glenn___> jodh: thats cool, and works good for me
[14:20] <jodh> glenn___: it's much more likely to be made available for precise.
[14:21] <jodh> glenn___: great, thanks.
[14:33] <glenn___> jodh: im trying to report a bug, would this title/summary make sense: SysV script returns the wrong exit code when fail2ban is not running
[14:34] <jodh> glenn___: makes sense to me :)
[14:34] <glenn___> jodh: it is just for the status command, should that be in there?
[14:34] <glenn___> im trying to make sure im having a good example, for next bugs :)
[14:35] <glenn___> perhaps this is better: SysV status script returns the wrong exit code when fail2ban is not running
[14:35] <jodh> glenn___: right.
[14:35] <glenn___> awesome
[14:43] <glenn___> jodh: would package maintainers know enough if the bug is stating the exit code is wrong?
[14:44] <jodh> glenn___: please give an actual example on the bug as this will make analysis and thus resolution easier.
[14:44] <glenn___> i understand, but im more wondering if i should also put in the code to perhaps fix it
[14:45] <glenn___> before i submit the bug :)
[14:45] <jodh> glenn___: if you have a fix, yes please provide it. I wouldn't hold off raising the bug though.
[14:45] <glenn___> https://bugs.launchpad.net/ubuntu/+source/fail2ban/+bug/920995
[14:47] <glenn___> i suppose this i something :)
[14:48] <jodh> glenn___: thanks.
[14:49] <glenn___> jodh: first of many :)
[14:49] <glenn___> jodh: btw, thank you !
[14:50] <glenn___> jodh: do you have an example bug for an upstart script request?
[14:50] <jodh> jodh: np. you might want to hang out on #ubuntu-devel if you're interested in getting involved.
[14:51] <glenn___> glenn: what exactly is nice about having in ubuntu-devel? :)
[14:51] <glenn___> s/having/hanging
[14:51] <jodh> take a look. This channel is for upstart-specific discussion, so we're getting a bit off topic here.
[14:51] <jodh> afk...
[16:47] <glenn___> ello
[16:48] <glenn___> when im using upstart to start puppet im having troubles. upstart gives the wrong pid back.
[16:49] <jodh> glenn___: Read this section carefully - http://upstart.ubuntu.com/cookbook/#expect in particular http://upstart.ubuntu.com/cookbook/#when-wrong-pid-is-tracked
[16:50] <glenn___> jodh: that will help :)
[18:35] <glenn___> jodh: it seems it forks 23 times after i start it, pretty weird if you ask me
[18:46] <glenn___> tomorrow another day
[19:51] <SpamapS> glenn___: its forking running things that it needs
[19:51] <SpamapS> glenn___: perhaps it doesn't need to use 'expect fork' ?