Page MenuHomePhabricator

Install molly-guard on production hosts
Closed, ResolvedPublic

Description

Just in case someone accidentally reboots a prod host while attempting to reboot a labs host, and doesn't want to be fed to a moose.

Event Timeline

yuvipanda raised the priority of this task from to Needs Triage.
yuvipanda updated the task description. (Show Details)
yuvipanda added a project: acl*sre-team.
yuvipanda subscribed.
Legoktm set Security to None.

Change 221111 had a related patch set uploaded (by Yuvipanda):
base: Install molly-guard everywhere

https://gerrit.wikimedia.org/r/221111

So this molly-guard package, is it going to be installed everywhere as in Labs and prod? A few emails and docs should be written because I, and I guarantee a few others, won't know how to use it and people will not be happy if they can't reboot their instances.

Looking at http://www.ubuntugeek.com/molly-guard-protects-machines-from-accidental-shutdownsreboots.html it seems super-simple to use. Literally just asks you for the target hostname when you type shutdown/restart/halt/poweroff to confirm that you meant to stop that particular host.

You still can reboot your instances, this is intended to prevent accidental reboots/shutdowns when logged into the wrong system:

$ apt-cache show molly-guard
(..)
One of the scripts checks for existing SSH sessions. If any of the four
commands are called interactively over an SSH session, the shell script
prompts you to enter the name of the host you wish to shut down. This should
adequately prevent you from accidental shutdowns and reboots.
(..)

They can reboot their instance - it just asks you to type in the name of the hostname before rebooting http://manpages.ubuntu.com/manpages/lucid/man8/molly-guard.8.html

Like I said I didn't know how to use it when I posted that. Now I do.

Change 221111 merged by Yuvipanda:
base: Install molly-guard everywhere

https://gerrit.wikimedia.org/r/221111