How graceful is Lassie?
Right now I'm having to shutdown my Linode while troubleshooting excessive cpu usage. With my machines at home 'shutdown -r' or 'shutdown -h' results in a graceful shutdown of services.
I know all the documentation and forum posts say Lassie is the way to go, but does she do it gently or is it a more like throwing the power switch?
Thanks,
digger
3 Replies
If you stop your Linode via the Manager (or API), Linode sends a Ctrl-Alt-Delete, gives your Linode ~2 minutes to stop itself, and then pulls the plug.
- Les
Looking further -- on a Fedora system it seems ctrl-alt-del used to be handled by /etc/inittab. Now days though it is handled by systemd and /usr/lib/systemd/system/ctrl-alt-del.target which initiates a reboot.servce. So it looks like Lassie's sending ctrl-alt-del initiates a gentle reboot
I'll then assume calling for a shutdown with Lassie will result in shutting down the Linode with a similar systemd service.
So given that 'shutdown -h now' in the Linode results in a reboot, if I want to actually shut it down, the way to do it is through Lassie which will initiate shutting down processes and services before the plug is pulled.
digger
@digger:
So given that 'shutdown -h now' in the Linode results in a reboot, if I want to actually shut it down, the way to do it is through Lassie which will initiate shutting down processes and services before the plug is pulled.
digger
As akerl mentioned, you can't have Lassie initiate a shutdown on your behalf. Lassie is just a shutdown watchdog. It monitors your Linode and if it detects a shutdown it restarts the instance. The only time Lassie won't initiate a restart is if you choose the shutdown command inside the Linode Manager. I am not sure how graceful that is to be honest. I haven't used it all that much. The reason 'shutdown -h now' causes a reboot is because Lassie can't tell why your Linode shutdown and issues a reboot.
I found a pretty old post from caker that explains Lassie:
Still think the post is pretty accurate.