=== mclasen is now known as mclasen_afk | ||
=== mclasen_afk is now known as mclasen | ||
melter | how do i specify in a script what to do when a service is stopped or restarted? | 19:16 |
---|---|---|
sadmac | melter: depends on what that script does and how it relates to the script stopping | 19:17 |
melter | it's for a database | 19:17 |
sadmac | melter: what does it do? | 19:18 |
melter | starts the database at boot and shuts it down when the server is rebooted; i've also got other scripts, but that's the one i'm re-writing atm | 19:18 |
melter | is there a complete upstart reference somewhere? | 19:19 |
sadmac | melter: man 5 init | 19:19 |
melter | it looks like pre-stop will work, but what does "It will be run before the job's stopping(7) event is emitted and before the main process is killed." mean? Will a stop command kill my database process? | 19:23 |
sadmac | eventually, yes | 19:23 |
melter | so how do i safely shut down something important without data loss? | 19:24 |
sadmac | in pre-stop you'd quiesce it and halt it | 19:25 |
melter | sadmac: thanks | 19:26 |
ion | <@ahu> classic 'One of our Google Summer of Code students took this to heart and implemented a binary search that was unfortunately not only incorrect but also slower than the linear search' | 21:58 |
ion | keybuk: It might be nice to have watershed-like functionality for tasks. ‘start foo’ if foo is already running would OR the ‘start_again’ flag for the instance with TRUE and when the instance stops, it would be started again if start_again is true. | 23:11 |
Keybuk | yeah, I can see why that'd be useful | 23:12 |
Keybuk | "restart task when done if another start request came in while it was running" | 23:12 |
ion | Should also happen with start-inducing events including cron-like ones and state changes. | 23:17 |
Keybuk | sure | 23:22 |
Keybuk | same thing really | 23:22 |
ion | Yeah | 23:23 |
Keybuk | my next two weeks are going to be trying to write down Upstart design stuff | 23:25 |
Keybuk | draw pretty diagrams etc. | 23:25 |
ion | Alright | 23:25 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!