[Nut-upsuser] Understanding the shutdown sequence of steps for a master and slave configuration

Paul Freeman paul.freeman at emlair.com.au
Fri Apr 20 01:22:12 UTC 2012

I am running the standard nut package (v 2.4.3) on a number of servers running Ubuntu 10.04 LTS. I have one master server which has an Upsonic 2000VA UPS connected via a USB port.  The driver I am using is blazer_usb.  I also have a number of slave servers (including some running virtual servers) running the same version of Ubuntu and nut as the master.

I have configured the master to use upssched to issue the upsmon -c fsd command after 10 minutes of the UPS running on battery as I decided after much thought was the "best" way to allow sufficient time for the slaves and master to shutdown after a power failure.

I was recently away and a power failure occurred. The nut master detected this and the slaves picked this up also.  The power outage continued for > 10minutes so the upssched timer expired and upsmon -c fsd command was issued.  The slaves detected this and commenced shutting down as expected.

However, the master also commenced shutting down.  I had expected the master to wait until the slaves had indicated they were shutting down before shutting itself down.  This meant a number of the slave servers did not complete a clean shutdown before the power was removed.

I was wondering what is the best way to ensure the slaves have actually shutdown before the master shuts down?  The options I see at the moment include specifying a longer HOSTSYNC value (I am using the default of 15 sec), a longer FINALDELAY value (I am using the default of 5 sec) or edit the SHUTDOWNCMD so that it waits for a few minutes before actually shutting down? At this point I have decided to change the time parameter to the SHUTDOWNCMD to 5 minutes as I am confident the UPS has sufficient reserve to last that long.

In trying to understand what actually happens on a slave when it receives the FSD command I have noticed the slave does not appear to actually formally logout from the master server.  ie there are no log entries indicating the slave logged out in syslog.  Is this the expected behaviour?

Also, is there any way to see how many logged in slaves there are on the server?

Any comments and suggestions are welcome.



More information about the Nut-upsuser mailing list