mcarter | hello | 02:58 |
---|---|---|
mcarter | in an upstart job, how can I specify the user to run the job as? | 02:58 |
keesj | don't know | 08:40 |
plundra | mcarter: I don't think there is a built in way. | 10:51 |
plundra | mcarter: I'm using 'sudo -u user cmd' | 10:51 |
plundra | "chdir /some/where", "exec sudo -u foo ./app" | 10:52 |
plundra | Anyway, I came here with a question! :-D What's the best way to restart stuff? Make a script that is invoked by emitting something fancy? | 10:53 |
plundra | Or using ... stop ... ; ... start ... manually. | 10:54 |
Keybuk | there's a restart command? | 10:55 |
plundra | Not with initctl in 0.3.9 (I'm using the latest Ubuntu LTS release) | 10:58 |
plundra | So I guess it was added in 0.4.x or 0.5.0, darn it :-D | 10:59 |
Keybuk | ah, no there's no restart there | 10:59 |
Keybuk | stop && start is as close as you can get | 11:00 |
Keybuk | though that's not entirely atomic, it's close enough | 11:00 |
plundra | Yeah, but it will do. Thanks anyway :) | 11:00 |
keesj | when I do "stop on starting service_xxx" in service_yyy and I start service_xxx. the service_xxx is not waiting for the service_yyy to stop | 11:07 |
keesj | is there a wait around this? | 11:07 |
keesj | to be stopped | 11:07 |
Keybuk | err, it should | 11:09 |
keesj | I am not sure what is indened. the reverse "start on starting an_other_service" does wait | 11:11 |
Keybuk | which version of Upstart | 11:12 |
keesj | so if (a = start on starting b) and I start B b will only reach started once a i staterd | 11:12 |
keesj | 0.3.9 | 11:12 |
keesj | Ok at leat I now know what is indened. I only discovered this recently because the stop script wat taking very long | 11:14 |
Keybuk | WFM here | 11:15 |
Keybuk | quest event.d# cat test-stopper | 11:16 |
Keybuk | stop on starting test-starter | 11:16 |
Keybuk | service | 11:16 |
Keybuk | post-stop script | 11:16 |
Keybuk | sleep 5 | 11:16 |
Keybuk | end script | 11:16 |
Keybuk | quest event.d# cat test-starter | 11:17 |
Keybuk | service | 11:17 |
Keybuk | -- | 11:17 |
Keybuk | quest event.d# status test-stopper | 11:17 |
Keybuk | test-stopper (start) running | 11:17 |
Keybuk | -- | 11:17 |
Keybuk | quest event.d# start test-starter | ts | 11:17 |
Keybuk | Jan 09 11:16:54 test-starter (start) waiting | 11:18 |
Keybuk | Jan 09 11:16:54 test-starter (start) starting | 11:18 |
Keybuk | Jan 09 11:16:59 test-starter (start) pre-start | 11:18 |
Keybuk | Jan 09 11:17:00 test-starter (start) spawned | 11:18 |
Keybuk | Jan 09 11:17:00 test-starter (start) post-start | 11:18 |
Keybuk | Jan 09 11:17:00 test-starter (start) running | 11:18 |
Keybuk | note the 5s delay | 11:18 |
keesj | yes, the problem is probably a little more complex , I just wrote about the same test and it "works" | 11:19 |
keesj | what is ts? | 11:21 |
Keybuk | timestamps its input? | 11:30 |
keesj | I see | 12:12 |
keesj | while read i ; date -n ; echo $i ; done | 12:13 |
keesj | somethine like that :p | 12:14 |
Keybuk | indeed | 12:14 |
keesj | something like that , sorry for the spam | 12:14 |
Keybuk | it's in moreutils in Debian/Ubuntu | 12:15 |
keesj | 113 lines of perl :p | 12:16 |
ion_ | Well, its sloccount is 62. :-) | 12:19 |
=== notting_ is now known as notting | ||
sadmac2 | notting: so what do we do about 450488? | 16:17 |
sadmac2 | I vote kill telinit u support | 16:17 |
notting | 1) fix it to translate job state | 16:18 |
notting | 2) fix it so it ignores 'u' | 16:18 |
notting | (*accepts the argument, but ignores it) | 16:18 |
sadmac2 | 1 isn't productive because the damn code isn't sitting still long enough | 16:18 |
Keybuk | telinit u? | 16:20 |
* Keybuk tries to remember his sysvinit | 16:20 | |
Keybuk | that's "reload configuration *and make changes to running state*" isn't it? | 16:20 |
Keybuk | oh, no | 16:21 |
Keybuk | telinit u is reexec | 16:21 |
Keybuk | I thought you implemented that one? | 16:21 |
Keybuk | I remember seeing some very very amusing code that had initctl send a special message to upstart, had upstart receive and process that message; and then just send itself SIGTERM | 16:21 |
notting | it loses track of job state | 16:22 |
Keybuk | oh | 16:22 |
Keybuk | that's just a general "not yet 1.0" bug ;) | 16:23 |
Keybuk | I fully intend to have state passing working before 1.0 | 16:23 |
notting | sadmac2: so, yeah. make it a no-op for now | 16:28 |
sadmac2 | notting: agreed | 16:29 |
sadmac2 | I'll do that when I get home | 16:29 |
sadmac2 | Keybuk: could you please weigh in on the new waitfd thread on lkml? | 16:29 |
sadmac2 | they're asking for why/wherefore stuff, and that's not my strong suit :) | 16:30 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!