/srv/irclogs.ubuntu.com/2009/08/26/#upstart.txt

=== robbiew-afk is now known as robbiew
=== robbiew is now known as robbiew-afk
=== robbiew-afk is now known as robbiew
Steveegood evening19:02
keesjhi19:02
Steveei´ve a problem with upstart und shutdown the system19:03
Steveei emit the shutdown event19:04
Steveethe job stats and some jobs stops19:04
Steveebut then the the system halts and not all services are stopped clearly19:05
Steveeis there way to check if all services are stopped bevore upstart power of the system ?19:06
Steveekeesj: do you have any idea for this problem ?19:07
sadmac2Stevee: 1) are you sure there's reason to do that? For a lot of services its just a waste of time. 2) what do your job definitions look like now?19:07
Steveemy job file looks like that19:08
Steveehttp://git.ipfire.org/?p=ipfire-3.x.git;a=blob;f=src/initscripts/core/shutdown.conf;h=394b2274636e58ed9bef1b58150b87a2b0ad3079;hb=1237e47913328b79e5908d0d2c77f855c054ac0419:09
Steveeif i remove the whole script19:09
Steveei got messages from als services that they have stopped on the console19:09
Steveeif i start the job with the script section19:09
Steveei only get a message of 2 or 3 jobs19:10
Steveeafter that, the system powered off19:10
Steveeand all other jobs aren´t killed clearly19:10
sadmac2Stevee: yes, that's going to halt the system as soon as it gets shutdown, with no regard to what else is going on19:10
sadmac2Stevee: do your other services have "stop on shutdown" and that is how they shut down?19:11
Steveeyes, they have stop on shutdown or reboot19:11
sadmac2Stevee: yes. this won't work :)19:11
Steveemhm okay, why ?19:12
sadmac2Stevee: make them stop on some other event (stop-all say) and then add an emits stop-all stanza to your shutdown job, and in the script do initctl emit stop-all19:12
Steveeand why i can´t use stop on shutdown or reboot ?19:14
sadmac2Stevee: everything that happens on shutdown or reboot will happen at the same time.19:15
Steveeso if emits a stop-all, all services will be stopped19:16
Steveeand than, the system will halt ?19:16
Steveeor reboot ?19:16
sadmac2yes.19:18
keesj Stevee do you always have the same behaviour or not?19:18
Steveeyes19:18
Steveeallways the same19:18
keesjand do all your job directly depend or stop on "starting" shutdown?19:19
keesj(what version btw?)19:19
Steveeno only on stop on shutdown or reboot19:19
Steveeversion is 0.6.319:19
Steveealso the current one19:19
keesjon thing that can happen is that one script fails and this makes the rest fail19:20
Steveebut without compatiblity ( no runlevels )19:20
keesjStevee: also I think you need stop on starting 19:21
keesjthe ohter problem I see is that your even is names after the job name19:22
keesjso shoulden't it be "stop on starting shutdow" so first everything is started before the schutdown script is executed19:22
sadmac2Stevee: he's right. Stop on starting shutdown will let you avoid having to do the emits/initctl emit19:23
keesj(I have not played much with 0.6.3 yet)19:23
Steveestop on starting shutdown or reboot, is that correct19:24
Steveeor do i need19:24
Steveestop on starting shutdown19:25
Steveestop on starting reboot19:25
Steveei two lines ?19:25
keesjyou are no longer allowed to have two lines any more19:25
Steveeokay19:25
keesjstop on starting shutdown or starting reboot(I would guess)19:25
Steveeokay, and do i have to change the job name to something other than shutdown like "anything"19:27
Stevee?19:27
Steveedo you know a distribution that uses upstart fully event based ?19:27
sadmac2Stevee: you don't /have/ to rename the job, but its probably better practice to not have jobs and events with the same name19:28
Steveeokay so if i name the event halt and the job shutdown, i add to all other jobfiles stop on starting halt or starting reboot19:30
Steveeeverything should work fine ?19:30
sadmac2you'll want stop on starting shutdown19:30
sadmac2starting <jobname>19:30
Steveeoh, the jobname, okay19:31
sadmac2the other jobs will then stop whenever something tries to start your shutdown job, and they will block that shutdown job until they have all stopped19:31
Steveeoh, i see19:35
Steveei allways depended on the event19:35
Steveenot on the started job19:35
sadmac2its still an event. started is the name of the event. shutdown is the first argument19:36
Steveeyes, but i also have to change the eventname or ?19:36
sadmac2you can have an event named shutdown and a job named shutdown, and that's fine. but its confusing.19:37
Steveeoh, okay19:38
Steveeso i will try it now, i will give a feedback19:38
Steveethanks for your help19:38
keesjStevee: one more tip19:42
keesjyou can set the log-priority using initctl. and when set to verbose it can help to understand what is going on19:43
Steveenow the shutdown / reboot worked fine19:45
Steveethanks19:45
Steveebut how can i hide all the messages of the stopped services ?19:46
sadmac2Stevee: you'd have to do that on a service-by-service basis19:53
Steveeyes, i used it as event by service19:53
Steveeif you want, you can add us to your list of know distributions that are using upstart19:55
Steveewe are a firewall distribution called ipfire19:56
Steveepage: http://www.ipfire.org19:56
=== robbiew is now known as robbiew_
Steveeguy i´ve to go to bed, i wish you a nice evening and thanks for your help again23:04
Steveehopefully we will see you again23:05
Steveegood bye23:05

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