/srv/irclogs.ubuntu.com/2009/01/09/#upstart.txt

mcarterhello02:58
mcarterin an upstart job, how can I specify the user to run the job as?02:58
keesjdon't know 08:40
plundramcarter: I don't think there is a built in way.10:51
plundramcarter: I'm using 'sudo -u user cmd' 10:51
plundra"chdir /some/where", "exec sudo -u foo ./app" 10:52
plundraAnyway, 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
plundraOr using ... stop ... ; ... start ... manually.10:54
Keybukthere's a restart command?10:55
plundraNot with initctl in 0.3.9 (I'm using the latest Ubuntu LTS release)10:58
plundraSo I guess it was added in 0.4.x or 0.5.0, darn it :-D10:59
Keybukah, no there's no restart there10:59
Keybukstop && start is as close as you can get11:00
Keybukthough that's not entirely atomic, it's close enough11:00
plundraYeah, but it will do. Thanks anyway :)11:00
keesjwhen 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 stop11:07
keesjis there a wait around this?11:07
keesjto be stopped 11:07
Keybukerr, it should11:09
keesjI am not sure what is indened. the reverse "start on starting an_other_service" does wait11:11
Keybukwhich version of Upstart11:12
keesjso if (a = start on starting b) and I start B b will only reach started once a i staterd11:12
keesj0.3.911:12
keesjOk at leat I now know what is indened. I only discovered this recently because the stop script wat taking very long11:14
KeybukWFM here11:15
Keybukquest event.d# cat test-stopper11:16
Keybukstop on starting test-starter11:16
Keybukservice11:16
Keybukpost-stop script11:16
Keybuk   sleep 511:16
Keybukend script11:16
Keybukquest event.d# cat test-starter 11:17
Keybukservice11:17
Keybuk-- 11:17
Keybukquest event.d# status test-stopper   11:17
Keybuktest-stopper (start) running11:17
Keybuk--11:17
Keybukquest event.d# start test-starter | ts11:17
KeybukJan 09 11:16:54 test-starter (start) waiting11:18
KeybukJan 09 11:16:54 test-starter (start) starting11:18
KeybukJan 09 11:16:59 test-starter (start) pre-start11:18
KeybukJan 09 11:17:00 test-starter (start) spawned11:18
KeybukJan 09 11:17:00 test-starter (start) post-start11:18
KeybukJan 09 11:17:00 test-starter (start) running11:18
Keybuknote the 5s delay11:18
keesjyes, the problem is probably a little more complex , I just wrote about the same test and it "works"11:19
keesjwhat is ts?11:21
Keybuktimestamps its input?11:30
keesjI see12:12
keesjwhile read i ; date -n ; echo $i ; done12:13
keesjsomethine like that :p12:14
Keybukindeed12:14
keesjsomething like that , sorry for the spam12:14
Keybukit's in moreutils in Debian/Ubuntu12:15
keesj113 lines of perl :p12:16
ion_Well, its sloccount is 62. :-)12:19
=== notting_ is now known as notting
sadmac2notting: so what do we do about 450488?16:17
sadmac2I vote kill telinit u support16:17
notting1) fix it to translate job state16:18
notting2) fix it so it ignores 'u'16:18
notting(*accepts the argument, but ignores it)16:18
sadmac21 isn't productive because the damn code isn't sitting still long enough16:18
Keybuktelinit u?16:20
* Keybuk tries to remember his sysvinit16:20
Keybukthat's "reload configuration *and make changes to running state*" isn't it?16:20
Keybukoh, no16:21
Keybuktelinit u is reexec16:21
KeybukI thought you implemented that one?16:21
KeybukI 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 SIGTERM16:21
nottingit loses track of job state16:22
Keybukoh16:22
Keybukthat's just a general "not yet 1.0" bug ;)16:23
KeybukI fully intend to have state passing working before 1.016:23
nottingsadmac2: so, yeah. make it a no-op for now16:28
sadmac2notting: agreed16:29
sadmac2I'll do that when I get home16:29
sadmac2Keybuk: could you please weigh in on the new waitfd thread on lkml?16:29
sadmac2they'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!