/srv/irclogs.ubuntu.com/2014/07/24/#upstart.txt

rjrI'm running upstart 1.5 on Ubuntu Precise. I created a job in /etc/init. It showed up in initctl show-config and things seemed to be working ok for a few minutes, and then I noticed it was no longer picking up changes (e.g. no matter what I set 'start on' and 'stop on' to, initctl show-config still used the old values)00:51
rjrI've removed the files from /etc/init and they still show up in show-config (and when I query dbus directly with com.ubuntu.Upstart0_6.GetAllJobs)00:52
rjror rather, one of the files I removed no longer shows up, but the other one still does.00:52
rjrI've added and removed other files just to verify the inotify job is still picking things up. It just won't get rid of this one entry.00:53
rjrI suspect it had to do with setting the 'expect fork/daemon' setting wrong as I've seen a few other reports of similar issues00:54
rjrgot it. It was https://bugs.launchpad.net/upstart/+bug/406397   I resolved my issue by spawning a process with the right pid and letting upstart reap it.01:04
rjrAlways fun when someone reinvents the wheel and makes it square instead.01:06
checkershi, I'd like to run mkfs on a particular device before local filesystems are mounted. Is the Right Way to implement this as an upstart job that has 'start on starting local-filesystems'?05:30
checkersI feel like this one-time command is a bit of a weird fit for a job-based system, is there some 'just run this script' thing I can do without needing to modify OS dist files?05:31
om26erHi! I need help with this upstart job http://bazaar.launchpad.net/~phablet-team/address-book-service/trunk/view/head:/upstart/address-book-service.conf14:57
om26erinitctl seems to not be able to stop the service on my phone, it does print that the service stopped but it actually keeps running14:57
jodhom26er: what does 'status address-book-service' show? maybe the binary is forking and therefore not being tracked correctly by upstart. Anything in ~/.cache/upstart/address-book-service.log?14:58
xnoxom26er: which of the two upstarts are you stopping it with? and which upstart is the job running on?14:59
xnoxom26er: compare $ adb shell status address-book-service14:59
xnoxom26er: with $ adp shell sudo -u phablet -i status address-book-service14:59
om26erxnox, the one as phablet user reports the other just says 'Unknown job'15:03
xnoxom26er: so, try stopping with e.g. $ adb shell sudo -u phablet -i stop address-book-service15:04
xnoxom26er: if it keeps running, then either the job<->daemon are buggy.15:04
xnoxom26er: or the service is otherwise activated e.g. direct invocation or like via dbus15:05
om26erxnox, yeah it says 'address-book-service stop/waiting' but the service keeps running with the same pid15:05
om26eralso address-book-service.log doesn't have anything15:06
om26erjodh, ^15:06
om26erxnox, on desktop where upstart job is not used, the service does get started when its dbus interface it poked15:07
xnoxom26er: probably the job never started via upstart...15:08
xnoxom26er: try this -> kill the address-book-service, check that none are running.15:08
om26erxnox, it respawns instantly15:08
xnoxom26er: start via upstart and stop via upstart, and verify that service is running and stops.15:08
xnoxom26er: kill it harder =) e.g. kill -9 15:09
xnoxom26er: and e.g. remove the dbus activation service file, to prevent things from spawning it.15:10
om26erxnox, kill -9 and -3 respawns, I can try removing the dbus service file to check15:10
om26ersince the service only supports one instance, initctl thinks it was able to start the service after I stop and start it but in reality only the old instance keeps running15:11
om26erxnox, yes, deleting the dbus activation service file did the trick15:16
om26ernow start/stop works with upstart15:17
xnoxom26er: well you need to choose one or the other.15:17
xnoxom26er: a few services that tedg wrote do "$ start job" in their dbus activation file.15:17
xnoxom26er: such that it's always run under upstart.15:17
xnoxom26er: when ubuntu transitions to systemd that race will be gone, as dbus activated services are running as systemd units - just like the rest of the jobs.15:18
om26erxnox, ok, I'll take this to the address-book-service developer and figure out a solution with him15:18
om26erxnox, is there any example project where tedg did that ?15:18
xnoxom26er: i can't remember of the top of my head. just browse dbus activation files on the phone and look those that launch wrappers that ultimately call $ start job15:19
om26erxnox, alright, thanks 15:21
=== JanC_ is now known as JanC

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