I have a cluster that I manage and from time to time I get emails from each node (and head node) begging to be restarted after an automatic upgrade.
Currently, my best solution so far is a shell script like:
$> cat cluster_reboot.sh
ssh root@node1.host.edu reboot
ssh root@node2.host.edu reboot
ssh root@node3.host.edu reboot
ssh root@node4.host.edu reboot
ssh root@node5.host.edu reboot
ssh root@headnode.host.edu reboot
I end up just typing the root password six times, but it works, I guess. Is there a better way? Can I force the head node to reboot the computers for me?
UPDATE: I'd like to shy away from using keyless login for the root user... but that is a method that would definitely work.
UPDATE 2: Key pairs might have a use after all. What about a keyed login to the head node, then keyless login from the head node to all the compute nodes. Then something like the following:
$> ssh root@headnode
Enter password for 'root':
[<headnode>]$: cat cluster_reboot.sh
ssh root@node1.host.edu reboot
ssh root@node2.host.edu reboot
ssh root@node3.host.edu reboot
ssh root@node4.host.edu reboot
ssh root@node5.host.edu reboot
echo "Nodes rebooted. Rebooting this computer now."
reboot
[<headnode>]$: sh cluster_reboot.sh
"Nodes rebooted. Rebooting this computer now."
I think that might be the secure+easy solution.