declanmg | Hi all | 12:12 |
---|---|---|
declanmg | Is there anyway to set the PATH within an /etc/somejob.conf upstart file? | 12:13 |
declanmg | 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:13 |
ion | The env stanza should probably work in somejob.conf. | 12:14 |
declanmg | 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 |
ion | init(5) | 12:16 |
ion | And the cookbook | 12:16 |
declanmg | ion: mmm... will research the cookbook | 12:19 |
declanmg | Cheers | 12:19 |
ion | Be sure to look at init(5) as well. | 12:20 |
declanmg | ion: Will do, thanks again. | 12:44 |
declanmg | Very useful resources, ion | 12:56 |
declanmg | 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:58 |
declanmg | 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) | 12:59 |
declanmg | 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 |
declanmg | Which I don't think is possible :( | 13:07 |
SpamapS | We should watch serverfault.com for good upstart questions and potential cookbook additions | 16:52 |
SpamapS | http://serverfault.com/questions/307704/how-can-i-ensure-a-script-gets-executed-after-a-service-is-stopped-but-before-an/351115#351115 | 16:52 |
SpamapS | Have seen a number of them the last few days | 16:53 |
SpamapS | 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:54 |
jodh | 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). | 16:58 |
SpamapS | 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:16 |
SpamapS | jodh: I have wondered about having rc emit events for all scripts it runs. | 17:17 |
jodh | jodh: ditto. rhel6 do this I believe. | 17:17 |
JanC | SpamapS: might be usefull to add a link to the cookbook to such questions too? | 18:55 |
SpamapS | JanC: yeah that would probably be good | 18:56 |
ahammond | 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:21 |
JanC | you can't upgrade to Ubuntu 11.10 instead? | 22:38 |
ahammond | JanC: that gets me 1.3 (which is good, but… no setuid / setgid) and it's a much harder sell. | 23:10 |
ahammond | the answer might be to wait for 12.4 which we are planning to upgrade to anyway. | 23:10 |
JanC | ah, you really mean latest-latest ☺ | 23:11 |
ahammond | JanC: setuid/setgid lets me write upstart scripts that don't need sudo or start-stop-daemon: win | 23:12 |
ahammond | and that logging stuff… also a big win. | 23:12 |
JanC | logging stuff is cool, setuid stuff sounds more like "sugar"? ☺ | 23:13 |
JanC | anyway, I don't know about a PPA, but there might be an unofficial one somewhere | 23:14 |
ahammond | JanC: we have some in house apps where setuid is more like "absolute requirement" :) | 23:14 |
JanC | well, sudo should work | 23:14 |
ahammond | I've been using start-stop-daemon since it also gets me chdir and chroot jails if I want them. | 23:15 |
JanC | or that | 23:15 |
ahammond | we'll probably just put the project off until we've moved to 12.4. | 23:15 |
ahammond | Hmmm... | 23:16 |
JanC | it might be possible to make a backport of upstart, but that also might require some changes to existing jobs maybe...? | 23:17 |
ahammond | yeah, probably too much change for production boxes. We've already scheduled the upgrade to 12.4, so... | 23:18 |
JanC | 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:18 |
JanC | (and also useful for you if they fix issues before you need to depend on it) | 23:19 |
ahammond | I'd love to help out. What exactly would be needed? | 23:20 |
JanC | 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:22 |
JanC | (assuming precise already has the latest upstart, of course) | 23:23 |
ahammond | JanC: looks like it's got 1.4 | 23:23 |
JanC | 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:25 |
SpamapS | 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:43 |
ahammond | SpamapS: I think we'll wait until we have 12.4. | 23:51 |
SpamapS | ahammond: its really just syntactic sugar.. start-stop-daemon does in fact do the same thing. | 23:54 |
ahammond | SpamapS: yeah, I've been writing them using start-stop-daemon. Makes for some ugly stuff. Want pretty instead. :) | 23:57 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!