/srv/irclogs.ubuntu.com/2013/11/27/#upstart.txt

Unit193Sooo, is there a way to unwedge upstart then?  As in, when it loses track of a job and still thinks it's running, but you can't start or stop it?  (Causing upgrades to not work)01:55
adrien_owwxnox: well, for my issue, I've reverted some changes back without effect; I don't understand what is wrong but it's most probably a recent change on my end10:37
adrien_owwI have to change topic a bit but I'll get back to this when I can10:37
magmattI've got an upstart script that when stopped doesn't stop all the child processes: http://paste.ubuntu.com/6484975/  This shows the problem: http://bpaste.net/show/yS98t42s9ki5umrFFDoG/  Why isn't that last processes killed when its parent is killed?15:55
magmattyou can see it lingering in line 16 of the second paste15:55
magmattafaik there's no forking going on; nothing daemonizes15:56
xnoxmagmatt: this is very odd job.16:07
magmattit looks like the su might be doing some kind of daemonizing16:07
magmattxnox: yeah, it kind of is :(16:07
xnoxmagmatt: setuid shampain; setgid shampain; exec /home/shampain/start-shampain.sh16:08
xnoxmagmatt: instead of using su, cause stopping will be killing su.....16:09
xnoxmagmatt: with setuid/setgid stanzas you will not need su.16:09
xnoxmagmatt: you might be required to export/set $HOME16:09
magmattxnox: okay, let me try that16:09
xnoxmagmatt: ideally you would not have wrapper script, but write it out directly in script stanza.... but not sure how to deal with decrypt thing.16:10
magmattwhich brings me to another question: sometimes when I can the upstart conf script, I can't start/stop/restart because it complains of "stop: Unknown job: shampain"16:11
magmattsuch is the case right now16:11
magmatts/can/change/16:11
xnoxyou must have made a mistake, and it rejected the conf file.16:13
xnoxinit-checkconf /path/to/your/job.conf16:13
xnoxshould say what it complains about.16:13
magmattxnox: I don't have init-checkconf, but the setuid and setgid stanzas are the problem (commenting them out make it work again).  I'm using upstart 0.6.516:15
magmattperhaps that's why16:15
xnoxah.16:15
xnoxthat's rather old.16:15
xnoxmagmatt: in that case, instead of using su -c, use start-stop-daemon and pass command/user args to it. then stop will send singnals to start-stop-daemon, which will in turn relay them.16:16
xnoxit accepts --user option, etc.16:16
magmattxnox: great!  Let me give that a try.  (And I'll see if ops is willing to upgrade upstart)16:17
magmattbah, this box doesn't have start-stop-daemon either :(16:23
magmattxnox: thank you for your help.  You've given me plenty to go on -- I'll need to see what we can do about installing things on this machine16:24

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