/srv/irclogs.ubuntu.com/2012/01/24/#upstart.txt

trondmHi. 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:29
jodhtrondm: creating a 3rd upstart job that specifies "start on some-event" and then "exec restart some-job" would do it.11:30
trondmOK. Thanks.11:32
glenn___Afternoon13:54
glenn___Ive been working on precise for some days now, and im noticing that a lot of software doesnt have upstart scripts13:55
glenn___What exactly are the guide lines on this?13:55
glenn___Will each software package in precise come with upstart scripts?13:56
jodhglenn___: we want to migrate SysV services to Upstart. See https://blueprints.launchpad.net/ubuntu/+spec/foundations-p-upstart-convert-main-initd-to-jobs13:56
glenn___jodh: im trying to implement puppet13:56
glenn___im having lots of troubles with init.d scripts, or non existent upstart scripts13:57
glenn___fail2ban is not correct, postgresql fails13:57
glenn___jodh: can I add software on that list?13:57
jodhglenn___: Due to the number of packages available (incl. universe, multiverse, etc), we need help to work on this migration.13:57
glenn___jodh: id be happy to help out with this13:58
jodhglenn___: 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 package13:59
glenn___jodh: im currently only seeing mysql and ssh in upstart for the software we support13:59
glenn___jodh: my biggest issue is that even the sysv scripts are not working properly, i.e. status will give the wrong exit code14:00
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
jodhglenn___: please raise bugs if you find them.14:01
glenn___jodh: what exactly is the way to go if i wanted to add an upstart script to a software package? 14:02
jodhglenn___: you need to add a debian/<package>.upstart file.14:03
glenn___jodh: i never did work on packages before, hence my question :)14:04
jodhglenn___: I'd strongly recommend you read this first then: https://wiki.ubuntu.com/PackagingGuide/Complete14:04
glenn___jodh: im only interested in the upstart scripts14:06
jodhglenn___: 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
jodhglenn___: ok, if you'd like to contribute some upstart conf files that would be great.14:06
jodhglenn___: they do (?)14:06
glenn___yeah14:07
glenn___people just created packages without upstart scripts14:07
glenn___its weird to me14:07
glenn___or failing sysv scripts regarding the exit code14:07
jodhglenn___: 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, denyhosts14:08
glenn___jodh: oh ic14:09
jodhglenn___: 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 lot14:09
glenn___jodh: people arent really pushed towards creating upstart scripts in debian yet :)14:09
jodhglenn___: 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:10
jodhglenn___: 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 big14:11
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 precise14:12
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 me14:13
jodhglenn___: 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
jodhglenn___: if you haven't already seen it: http://upstart.ubuntu.com/cookbook/#how-to-establish-a-jobs-start-on-and-stop-on-conditions14:14
jodhglenn___: 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:16
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:19
jodhglenn___: 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 me14:20
jodhglenn___: it's much more likely to be made available for precise.14:20
jodhglenn___: great, thanks.14:21
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 running14:33
jodhglenn___: 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:34
glenn___perhaps this is better: SysV status script returns the wrong exit code when fail2ban is not running14:35
jodhglenn___: right.14:35
glenn___awesome14:35
glenn___jodh: would package maintainers know enough if the bug is stating the exit code is wrong?14:43
jodhglenn___: 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 it14:44
glenn___before i submit the bug :)14:45
jodhglenn___: 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/92099514:45
glenn___i suppose this i something :)14:47
jodhglenn___: thanks.14:48
glenn___jodh: first of many :)14:49
glenn___jodh: btw, thank you !14:49
glenn___jodh: do you have an example bug for an upstart script request?14:50
jodhjodh: np. you might want to hang out on #ubuntu-devel if you're interested in getting involved.14:50
glenn___glenn: what exactly is nice about having in ubuntu-devel? :)14:51
glenn___s/having/hanging14:51
jodhtake a look. This channel is for upstart-specific discussion, so we're getting a bit off topic here.14:51
jodhafk...14:51
glenn___ello16:47
glenn___when im using upstart to start puppet im having troubles. upstart gives the wrong pid back.16:48
jodhglenn___: Read this section carefully - http://upstart.ubuntu.com/cookbook/#expect in particular http://upstart.ubuntu.com/cookbook/#when-wrong-pid-is-tracked16:49
glenn___jodh: that will help :)16:50
glenn___jodh: it seems it forks 23 times after i start it, pretty weird if you ask me18:35
glenn___tomorrow another day18:46
SpamapSglenn___: its forking running things that it needs19:51
SpamapSglenn___: perhaps it doesn't need to use 'expect fork' ?19:51

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