I have a script running on machine A that needs to trigger the reboot of machine B and then wait until machine B is fully back up. This actually needs to happen multiple times in succession, so keeping the wait time to a minimum is somewhat important. (It's an automated test of varying boot parameter values.)
These machines are running Linux, so I figure the basic approach should be to install a late-running (e.g. priority 99) init script on machine B that somehow sends a message to machine A. I plan to install the script using update-rc.d ${script_name} start 99 S .
. However, where I'm stuck is how to send and wait for the message.
I figure there must be some sort of message queue or coordinator service that I can just script out of the box. For instance, Zookeeper should be capable, though how to script it is surprisingly non-obvious. I could write a little client/server program to do this (presumably using a TCP socket), but I was hoping for a simpler solution. The setup on machine B needs to be done entirely by the script on machine A, so steps like compiling or installing scripting language modules would ideally be avoided.
Thanks for any suggestions!