|
[02:54] <MarcWeber> How to handle this automount case? If /auto is active and you stop autofs then autofs just prints "Can't shutdown, /auto still active".. |
|
[02:55] <MarcWeber> However when you release /auto (by cding away) it still doesn't stop. Either upstart should resend some signals or automount should recall that it should shutdown when /auto can be released.. |
|
[02:55] <Keybuk> there probably is no event for a filesystem being in use or not |
|
[02:56] <MarcWeber> Keybuk: Maube automount should umount -l /auto and exit? |
|
[02:56] <MarcWeber> I don't know which party to patch. |
|
[02:58] <Keybuk> filesystems are hard |
|
[02:58] <Keybuk> they're pretty integral to the "upness" of a system |
|
[02:58] <Keybuk> bringing them up and tearing them down has proven quite the tough cookie |
|
[02:59] <MarcWeber> What is the default signal being send to the job to make it quit? |
|
[02:59] <Keybuk> TERM usually ;) |
|
[03:04] <MarcWeber> Maybe I should start this on stopping : "set -e; while :; do pkill -TERM automount; sleep 1; done |
|
[03:04] <Keybuk> or have automount "stop on starting OTHERJOB" |
|
[03:05] <MarcWeber> What is OTHERJOB? |
|
[03:05] <MarcWeber> When I say stop that job I want it to stop. |
|
[03:06] <Keybuk> what you were thinking of putting that code into |
|
[03:06] <Keybuk> ie. |
|
[03:06] <Keybuk> if you have |
|
[03:06] <MarcWeber> The problem is that automount get's the signal but ignores it. |
|
[03:06] <Keybuk> /etc/init/umount.conf |
|
[03:06] <Keybuk> exec umount -a |
|
[03:06] <Keybuk> and you need automount stopped first |
|
[03:06] <Keybuk> then |
|
[03:06] <MarcWeber> The script keeps resending the TERM signal. Upstart sends it only once |
|
[03:06] <Keybuk> /etc/init/automount.conf |
|
[03:06] <Keybuk> stop on starting umount |
|
[03:06] <Keybuk> sure |
|
[03:06] <Keybuk> Upstart sends it once |
|
[03:06] <Keybuk> waits for automount to get its act in gear |
|
[03:07] <Keybuk> if it doesn't follows up with SIGKILL |
|
[03:07] <MarcWeber> IF SIGKILL is sent /auto keeps mounted. I guess this is a autostart bug. |
|
[03:07] <MarcWeber> It should umount -l then.. |
|
[03:07] <Keybuk> yes |
|
[03:07] <Keybuk> automount shouldn't ignore SIGTERM |
|
[03:08] <Keybuk> how do you tell automount to stop normally? |
|
[03:08] <MarcWeber> It doesn't. But it neither unmounts its filesystems. |
|
[03:08] <MarcWeber> You send TERM ? |
|
[03:08] <Keybuk> you said it ignored TERM :p |
|
[03:08] <MarcWeber> IT does if you cd into the /auto directory.. |
|
[03:09] <MarcWeber> if you don't it will exit. |
|
[03:09] <Keybuk> how does it know? |
|
[03:10] <MarcWeber> Don't ask me. Probably it tries umount /auto and notices that that command fails |
|
[03:10] <Keybuk> oh |
|
[03:10] <Keybuk> right |
|
[03:10] <Keybuk> so don't do that then ;) |
|
[03:10] <MarcWeber> That's not an option. |
|
[03:10] <MarcWeber> I'm a human. I am allowed to make mistakes causing trouble.. |
|
[03:10] <MarcWeber> :) |
|
[03:10] <Keybuk> usually you kill all processes before unmounting anyway |
|
[03:10] <Keybuk> ie. killall5 -TERM; killall5- KILL; umount -a |
|
[03:11] <MarcWeber> Keybuk: It's another issue: I'm using NixOS. It restarts the job whenever the configuration changes. So maybe I should write an exception for that job as well .. |
|
[03:11] <Keybuk> possibly |
|
[03:11] <MarcWeber> hehe. How do you run halt then? |
|
[03:11] <Keybuk> after the filesystems are unmounted |
|
[03:11] <Keybuk> (you remount root read/only rather than unmounting) |
|
[03:11] <MarcWeber> Then the command may be gone.. |
|
[03:11] <Keybuk> halt is on the root |
|
[03:12] <MarcWeber> So you umount everything but root |
|
[03:12] <Keybuk> yes |
|
[03:27] <MarcWeber> How long will upstart wait until it sends SIGKILL (if there is no on stopping script running?) |
|
[22:40] <ion> keybuk: Gotta beam off some poop. Start running around. http://www.youtube.com/watch?v=l4HMCCspbUE |
|
|