[11:29] 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] trondm: creating a 3rd upstart job that specifies "start on some-event" and then "exec restart some-job" would do it. [11:32] OK. Thanks. [13:54] Afternoon [13:55] Ive been working on precise for some days now, and im noticing that a lot of software doesnt have upstart scripts [13:55] What exactly are the guide lines on this? [13:56] Will each software package in precise come with upstart scripts? [13:56] 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] jodh: im trying to implement puppet [13:57] im having lots of troubles with init.d scripts, or non existent upstart scripts [13:57] fail2ban is not correct, postgresql fails [13:57] jodh: can I add software on that list? [13:57] glenn___: Due to the number of packages available (incl. universe, multiverse, etc), we need help to work on this migration. [13:58] jodh: id be happy to help out with this [13:59] 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] 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] for that package [13:59] jodh: im currently only seeing mysql and ssh in upstart for the software we support [14:00] 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] "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] glenn___: please raise bugs if you find them. [14:02] jodh: what exactly is the way to go if i wanted to add an upstart script to a software package? [14:03] glenn___: you need to add a debian/.upstart file. [14:04] jodh: i never did work on packages before, hence my question :) [14:04] glenn___: I'd strongly recommend you read this first then: https://wiki.ubuntu.com/PackagingGuide/Complete [14:06] jodh: im only interested in the upstart scripts [14:06] 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] jodh: why dont package maintainers make the upstart scripts themselves? [14:06] glenn___: ok, if you'd like to contribute some upstart conf files that would be great. [14:06] glenn___: they do (?) [14:07] yeah [14:07] people just created packages without upstart scripts [14:07] its weird to me [14:07] or failing sysv scripts regarding the exit code [14:08] 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] upstart in precise: fail2ban, postgresql, puppet, varnishd, haproxy, denyhosts [14:09] jodh: oh ic [14:09] 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] jodh: that explains a lot [14:09] jodh: people arent really pushed towards creating upstart scripts in debian yet :) [14:10] glenn___: we are trying to address these issues though. any help you can provide would be very valuable to debian+ubuntu. [14:10] jodh: so if i would create an upstart script for a package, i would actually have to create the package myself ? [14:11] 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] jodh: yeah its very big [14:12] jodh: but the upstart scripts seems pretty evident to me.. just 1 file in /etc/init [14:12] jodh: at least, thats how i fix it now while testing precise [14:13] jodh: to be honest, it is not really easy to get an upstart script into a package :) [14:13] at least, thats how it looks te me [14:14] 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] 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] 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] 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] jodh: and in regard to ubuntu versions, like LTS (lucid, precise), can they have the same upstart script? [14:20] glenn___: yes - someone else with packaging experience can then add it to the appropriate package and test it. [14:20] jodh: thats cool, and works good for me [14:20] glenn___: it's much more likely to be made available for precise. [14:21] glenn___: great, thanks. [14:33] 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] glenn___: makes sense to me :) [14:34] jodh: it is just for the status command, should that be in there? [14:34] im trying to make sure im having a good example, for next bugs :) [14:35] perhaps this is better: SysV status script returns the wrong exit code when fail2ban is not running [14:35] glenn___: right. [14:35] awesome [14:43] jodh: would package maintainers know enough if the bug is stating the exit code is wrong? [14:44] glenn___: please give an actual example on the bug as this will make analysis and thus resolution easier. [14:44] i understand, but im more wondering if i should also put in the code to perhaps fix it [14:45] before i submit the bug :) [14:45] glenn___: if you have a fix, yes please provide it. I wouldn't hold off raising the bug though. [14:45] https://bugs.launchpad.net/ubuntu/+source/fail2ban/+bug/920995 [14:47] i suppose this i something :) [14:48] glenn___: thanks. [14:49] jodh: first of many :) [14:49] jodh: btw, thank you ! [14:50] jodh: do you have an example bug for an upstart script request? [14:50] jodh: np. you might want to hang out on #ubuntu-devel if you're interested in getting involved. [14:51] glenn: what exactly is nice about having in ubuntu-devel? :) [14:51] s/having/hanging [14:51] take a look. This channel is for upstart-specific discussion, so we're getting a bit off topic here. [14:51] afk... [16:47] ello [16:48] when im using upstart to start puppet im having troubles. upstart gives the wrong pid back. [16:49] 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] jodh: that will help :) [18:35] jodh: it seems it forks 23 times after i start it, pretty weird if you ask me [18:46] tomorrow another day [19:51] glenn___: its forking running things that it needs [19:51] glenn___: perhaps it doesn't need to use 'expect fork' ?