[12:12] Hi all [12:13] Is there anyway to set the PATH within an /etc/somejob.conf upstart file? [12:13] Or is there any other systemwide config file that it is appropriate to set the PATH in so that it is picked up by upstart jobs? [12:14] The env stanza should probably work in somejob.conf. [12:16] ion: Thanks a mill for the that. I will try it now. Have been exhaustively trying to track down docs on this online. [12:16] init(5) [12:16] And the cookbook [12:19] ion: mmm... will research the cookbook [12:19] Cheers [12:20] Be sure to look at init(5) as well. [12:44] ion: Will do, thanks again. [12:56] Very useful resources, ion [12:58] Though if I set the PATH env variable in job1 and export it, it is still not available in job2 (which I have set to start on job1). [12:59] Section 7.2 of the cookbook seems to suggest that the exported var should carry through (in the cookbook example's case it is $foo) [13:07] Alternatively, I could stick the env PATH stanza into /etc/init/env.conf but I need the upstart job to be able to pick up /etc/init/env.conf changes between server restarts. [13:07] Which I don't think is possible :( [16:52] We should watch serverfault.com for good upstart questions and potential cookbook additions [16:52] http://serverfault.com/questions/307704/how-can-i-ensure-a-script-gets-executed-after-a-service-is-stopped-but-before-an/351115#351115 [16:53] Have seen a number of them the last few days [16:54] oops meant to paste http://serverfault.com/questions/tagged/upstart .. though that is a good link to an answer I just gave that could use a few +1's ;) [16:58] SpamapS: good find, yes agreed. Also, we really must get apache2 et al upstartified (or atleast "initctl emit starting" et al added to SysV compat side of the world). [17:16] I think we should upstartify it the way I suggest.. we can't possibly handle the SIGUSR1 stuff properly with expect daemon/fork, so better that we just let apache2's pid file tracking do its thing, and just use upstart to insert the job into the event tree. [17:17] jodh: I have wondered about having rc emit events for all scripts it runs. [17:17] jodh: ditto. rhel6 do this I believe. [18:55] SpamapS: might be usefull to add a link to the cookbook to such questions too? [18:56] JanC: yeah that would probably be good [22:21] I'm running ubuntu 10.10 and want to get latest upstart on it. Is there a PPA / what's the right way to do that? [22:38] you can't upgrade to Ubuntu 11.10 instead? [23:10] JanC: that gets me 1.3 (which is good, but… no setuid / setgid) and it's a much harder sell. [23:10] the answer might be to wait for 12.4 which we are planning to upgrade to anyway. [23:11] ah, you really mean latest-latest ☺ [23:12] JanC: setuid/setgid lets me write upstart scripts that don't need sudo or start-stop-daemon: win [23:12] and that logging stuff… also a big win. [23:13] logging stuff is cool, setuid stuff sounds more like "sugar"? ☺ [23:14] anyway, I don't know about a PPA, but there might be an unofficial one somewhere [23:14] JanC: we have some in house apps where setuid is more like "absolute requirement" :) [23:14] well, sudo should work [23:15] I've been using start-stop-daemon since it also gets me chdir and chroot jails if I want them. [23:15] or that [23:15] we'll probably just put the project off until we've moved to 12.4. [23:16] Hmmm... [23:17] it might be possible to make a backport of upstart, but that also might require some changes to existing jobs maybe...? [23:18] yeah, probably too much change for production boxes. We've already scheduled the upgrade to 12.4, so... [23:18] ahammond: I'm sure the Ubuntu & Upstart developers would appreciate if you test this on precise *before* it gets released as 12.04 BTW ☺ [23:19] (and also useful for you if they fix issues before you need to depend on it) [23:20] I'd love to help out. What exactly would be needed? [23:22] ahammond: install a system (maybe a virtual machine) with the current development version of precise, and try to write the upstart job you need; if anything fails, report bugs so that (hopefully) they get fixed before the release ☺ [23:23] (assuming precise already has the latest upstart, of course) [23:23] JanC: looks like it's got 1.4 [23:25] so, try to set up something similar to your production system on it, make the cahnges you want, and pester the developers until they fix all issues ;) [23:43] upstart from precise should in theory backport just fine .. though the /run transition may require delicate handling if you try to go back to say, 10.04 [23:51] SpamapS: I think we'll wait until we have 12.4. [23:54] ahammond: its really just syntactic sugar.. start-stop-daemon does in fact do the same thing. [23:57] SpamapS: yeah, I've been writing them using start-stop-daemon. Makes for some ugly stuff. Want pretty instead. :)