/srv/irclogs.ubuntu.com/2012/08/16/#upstart.txt

sykopomphi, a coworker is having issues with conf file reloading. When he edits an upstart he's working on and checks the loaded config, it seems to stay the same.15:14
sykopompis there anything special that needs to be done? reload-config doesn't seem to do the trick, either.15:14
sykopomprebooting worked, but that's not really practical :)15:15
SpamapSsykopomp: are you on a live-cd/live-usb by any chance?16:51
sykopompno16:51
SpamapSsykopomp: ok. Well the job files should be reloaded using inotify. If not, you can just do 'initctl reload-configuration' to reload them all..16:51
SpamapSsykopomp: note that 'restart $jobname' does not actually use the new configuration for $jobname, you have to stop/start16:52
dlunaSpamapS: So if there are issues with stopping a job, the new config will not load?16:54
dluna> sudo stop s-core16:56
dlunastop: Job has already been stopped: s-core16:56
dlunasudo status s-core16:56
dlunas-core stop/killed, process 2622816:56
dlunathere is no process 26228.16:57
SpamapSdluna: ahh, the "expect loses track of X pid" bug16:58
SpamapSdluna: Your only recourse is to "resurrect" 26228 by exhausting pid space16:58
SpamapSdluna: http://paste.ubuntu.com/1151031/  that works16:59
dlunaThanks.17:01
dlunaThat was not the answer I was hoping for, but I'm very happy that you told me.17:01
SpamapSdluna: bug 406397 for your pleasure ;)17:02
SpamapShm, bot lagged?17:02
SpamapSdluna: http://pad.lv/40639717:03
dlunaYeah. I'm reading it.17:06
dlunaSucks!17:06
dlunaThat bug is *three years old*.17:08
SpamapSdluna: https://bugs.launchpad.net/upstart .. we're always grateful for bugfix help :)17:08
dlunayeah.  I sent two for the documentation already.17:08
SpamapSthat bug, btw, by far has the highest "heat" of any bug17:08
SpamapSaffects 4817:09
dlunaI'll add myself to it.17:09
SpamapSI'd raise the priority myself but I'm not on the bug supervisor team for upstart17:09
SpamapSjodh: ^^ perhaps this would be a good next target for bug fixing http://pad.lv/40639717:09
dlunabtw. Does anyone know how upstart detects the forked processes?  (I'm asking since using the strace/grep fork|clone test recommended at 6.11.4 in docs gives me a count of 34 (I'm using Erlang and just starting 'erl' yields 14 using that test (lots of threads)))17:31
SpamapSdluna: ptrace17:32
SpamapSdluna: it doesn't count threads as forks17:32
dlunaGood.17:33
SpamapSdluna: another option is just to keep your program in the foreground17:56
SpamapSwhich, frankly, I prefer17:56
SpamapSunless you have to depend on the 'started' event .. I think the 'expect fork' thing is of limited value for general purpose services. Seems about 50/50 whether or not things fork to signal that they're "ready"17:57
dlunaWell.  I haven't researched what the actual start sequence is doing.  I need to start our system at machine start, so it needs to be in the background (and then there is an 'attach' feature to connect to the shell).18:03
SpamapSdluna: if it has a mechanism to not "daemonize" (meaning it just starts up and keeps running, and doesn't fork/exit at start up) that will relieve you of needing expect fork18:11
SpamapSdluna: its still "in the background" in the sense that it is not attached to a terminal18:11
dlunaTrue.  I'm fairly certain that there is at least one fork in there.  Not my code unfortunately...18:16
SpamapSdluna: its not so much "is there a fork" but "is this the fork that produces the parent process that runs forever"18:21
dlunatrue18:59
dlunaSpamapS: anyway.  Thank you.  Immensely helpful.19:01
SpamapSdluna: any time19:11
dlunaIs there any way of talking about more than 2 execs in 'expect'?  Or for that matter specify the pid to be tracked (I have access to it, or can at least get access by using pgrep or looking in some logs).19:48
santinodIf I disable a service job (to prevent it from running at startup) by means of the ".override" file, I lose the ability to run it via the /etc/init.d script (as required e.g. by heartbeat). Is there a workaround?20:41
SpamapSdluna: you can just not use upstart's pid tracking by running the daemon in pre-start and killing it in post-stop...21:11
SpamapSdluna: you still get the events, just not tight control over the process21:12
SpamapSsantinod: are you sure you disable it from use by /etc/init.d ?21:12
santinodIf I create the .override file, the service is not run at startup (which is correct), but cannot be run by its /etc/init.d/ script either21:15
santinod"/etc/init.d/mysql start" does not run mysql any more21:16
SpamapSsantinod: no error is printed?21:23
SpamapSsantinod: I'm looking at the quantal version of /lib/init/upstart-job (which is what /etc/init.d/mysql is symlinked to) and it doesn't seem to check for manual21:24
SpamapSahh never mind21:25
SpamapSit checks using show-config21:25
santinodinitctl show-config -e "$JOB"|grep -q '^  start on' || DISABLED=121:25
SpamapSyeah21:25
SpamapSI'm not even sure why we did that21:25
santinodso it sets DISABLED=1 and later checks for it21:25
SpamapSsantinod: well you can get around this (lame as it is) by using 'start on never' instead of 'manual'21:26
SpamapSbecause then you'll still have a start on21:26
santinodI see21:28
santinodwell, I wanted to preserve as much as possible the integrity of the distro startup scripts (in this case Ubuntu)21:29
SpamapSsantinod: you can put 'start on never' in the .override21:29
SpamapSsantinod: you can rewrite the whole upstart job in there :)21:29
santinodthis sounds interesting21:30
santinodhmm, "start on never" in the .override seemed to do the trick21:31
santinodthanks a lot!21:32
SpamapSsantinod: one is glad to be of service21:34
dlunaSpamapS: thanks.  I'll do that.  That solves all of my problems I think.21:41
SpamapSdluna: just means respawn won't work21:47
SpamapSdluna: nor will the 'reload' command21:48
dlunaah. Of course.21:54
dlunareload won't work anyway, and I can use (erlang) heart to do my restarts for me.21:55
SpamapSawesome21:59
JoeGaudetHey guys, wondering if anyone can point me at the right place to figure out how to let a non root user call stop/start on a particular conf file ?23:49
JoeGaudetMaybe what I want is User Jobs ?23:51
SpamapSJoeGaudet: I think you want the dbus ACLs23:57

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