=== robbiew-afk is now known as robbiew | ||
=== robbiew is now known as robbiew-afk | ||
=== robbiew-afk is now known as robbiew | ||
Stevee | good evening | 19:02 |
---|---|---|
keesj | hi | 19:02 |
Stevee | i´ve a problem with upstart und shutdown the system | 19:03 |
Stevee | i emit the shutdown event | 19:04 |
Stevee | the job stats and some jobs stops | 19:04 |
Stevee | but then the the system halts and not all services are stopped clearly | 19:05 |
Stevee | is there way to check if all services are stopped bevore upstart power of the system ? | 19:06 |
Stevee | keesj: do you have any idea for this problem ? | 19:07 |
sadmac2 | Stevee: 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 |
Stevee | my job file looks like that | 19:08 |
Stevee | http://git.ipfire.org/?p=ipfire-3.x.git;a=blob;f=src/initscripts/core/shutdown.conf;h=394b2274636e58ed9bef1b58150b87a2b0ad3079;hb=1237e47913328b79e5908d0d2c77f855c054ac04 | 19:09 |
Stevee | if i remove the whole script | 19:09 |
Stevee | i got messages from als services that they have stopped on the console | 19:09 |
Stevee | if i start the job with the script section | 19:09 |
Stevee | i only get a message of 2 or 3 jobs | 19:10 |
Stevee | after that, the system powered off | 19:10 |
Stevee | and all other jobs aren´t killed clearly | 19:10 |
sadmac2 | Stevee: yes, that's going to halt the system as soon as it gets shutdown, with no regard to what else is going on | 19:10 |
sadmac2 | Stevee: do your other services have "stop on shutdown" and that is how they shut down? | 19:11 |
Stevee | yes, they have stop on shutdown or reboot | 19:11 |
sadmac2 | Stevee: yes. this won't work :) | 19:11 |
Stevee | mhm okay, why ? | 19:12 |
sadmac2 | Stevee: 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-all | 19:12 |
Stevee | and why i can´t use stop on shutdown or reboot ? | 19:14 |
sadmac2 | Stevee: everything that happens on shutdown or reboot will happen at the same time. | 19:15 |
Stevee | so if emits a stop-all, all services will be stopped | 19:16 |
Stevee | and than, the system will halt ? | 19:16 |
Stevee | or reboot ? | 19:16 |
sadmac2 | yes. | 19:18 |
keesj | Stevee do you always have the same behaviour or not? | 19:18 |
Stevee | yes | 19:18 |
Stevee | allways the same | 19:18 |
keesj | and do all your job directly depend or stop on "starting" shutdown? | 19:19 |
keesj | (what version btw?) | 19:19 |
Stevee | no only on stop on shutdown or reboot | 19:19 |
Stevee | version is 0.6.3 | 19:19 |
Stevee | also the current one | 19:19 |
keesj | on thing that can happen is that one script fails and this makes the rest fail | 19:20 |
Stevee | but without compatiblity ( no runlevels ) | 19:20 |
keesj | Stevee: also I think you need stop on starting | 19:21 |
keesj | the ohter problem I see is that your even is names after the job name | 19:22 |
keesj | so shoulden't it be "stop on starting shutdow" so first everything is started before the schutdown script is executed | 19:22 |
sadmac2 | Stevee: he's right. Stop on starting shutdown will let you avoid having to do the emits/initctl emit | 19:23 |
keesj | (I have not played much with 0.6.3 yet) | 19:23 |
Stevee | stop on starting shutdown or reboot, is that correct | 19:24 |
Stevee | or do i need | 19:24 |
Stevee | stop on starting shutdown | 19:25 |
Stevee | stop on starting reboot | 19:25 |
Stevee | i two lines ? | 19:25 |
keesj | you are no longer allowed to have two lines any more | 19:25 |
Stevee | okay | 19:25 |
keesj | stop on starting shutdown or starting reboot(I would guess) | 19:25 |
Stevee | okay, and do i have to change the job name to something other than shutdown like "anything" | 19:27 |
Stevee | ? | 19:27 |
Stevee | do you know a distribution that uses upstart fully event based ? | 19:27 |
sadmac2 | Stevee: you don't /have/ to rename the job, but its probably better practice to not have jobs and events with the same name | 19:28 |
Stevee | okay so if i name the event halt and the job shutdown, i add to all other jobfiles stop on starting halt or starting reboot | 19:30 |
Stevee | everything should work fine ? | 19:30 |
sadmac2 | you'll want stop on starting shutdown | 19:30 |
sadmac2 | starting <jobname> | 19:30 |
Stevee | oh, the jobname, okay | 19:31 |
sadmac2 | the other jobs will then stop whenever something tries to start your shutdown job, and they will block that shutdown job until they have all stopped | 19:31 |
Stevee | oh, i see | 19:35 |
Stevee | i allways depended on the event | 19:35 |
Stevee | not on the started job | 19:35 |
sadmac2 | its still an event. started is the name of the event. shutdown is the first argument | 19:36 |
Stevee | yes, but i also have to change the eventname or ? | 19:36 |
sadmac2 | you can have an event named shutdown and a job named shutdown, and that's fine. but its confusing. | 19:37 |
Stevee | oh, okay | 19:38 |
Stevee | so i will try it now, i will give a feedback | 19:38 |
Stevee | thanks for your help | 19:38 |
keesj | Stevee: one more tip | 19:42 |
keesj | you can set the log-priority using initctl. and when set to verbose it can help to understand what is going on | 19:43 |
Stevee | now the shutdown / reboot worked fine | 19:45 |
Stevee | thanks | 19:45 |
Stevee | but how can i hide all the messages of the stopped services ? | 19:46 |
sadmac2 | Stevee: you'd have to do that on a service-by-service basis | 19:53 |
Stevee | yes, i used it as event by service | 19:53 |
Stevee | if you want, you can add us to your list of know distributions that are using upstart | 19:55 |
Stevee | we are a firewall distribution called ipfire | 19:56 |
Stevee | page: http://www.ipfire.org | 19:56 |
=== robbiew is now known as robbiew_ | ||
Stevee | guy i´ve to go to bed, i wish you a nice evening and thanks for your help again | 23:04 |
Stevee | hopefully we will see you again | 23:05 |
Stevee | good bye | 23:05 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!