Error in NUT GUI sets FINALDELAY in upsmon.conf inappropriately

Status
Not open for further replies.

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
The UI for NUT allows one to set a timer in upssched.conf in order to shutdown Freenas (but inexplicably not the UPS, see bug 4134) a fixed time after the UPS goes on battery. The time setting for this timer is in a box which is greyed out when waiting for a low battery condition to shutdown Freenas, the default use case that does not use upssched.conf for deciding when to shutdown.

'FINALDELAY' is a setting in upsmon.conf which governs, following a another delay of default 15sec to allow slave systems to communicate, how long upsmon waits after deciding a shutdown is inevitable before actually shutting down Freenas. This perhaps explains the observation some in the forum have commented on that if the on battery delay is set to several minutes then NUT waits another several minutes before implementing its decision to shutdown. The default value of FINALDELAY is, I think, 5 seconds, and it should be very short as by default it follows a warning that the UPS battery is running out. Actually there seems no point at all in FINALDELAY but that is a decision of the NUT team!

Even worse, if one changes one's mind and uses the GUI to request a shutdown on low battery rather than a certain time after going on battery, then the inappropriate value of FINALDELAY is left behind and there is no way through the GUI to alter it.

This unexpected and unwanted delay in shutting down when the UPS battery is known to be about to fail is clearly dangerous to the filesystem!

Can anyone think of a reason why this may be intended behaviour before I report this as a serious bug (and ask for 4134 to be fixed at the same time as it is so trivial and safe to fix)?

Edited for sentence order only, in order to make sense, 31/8/14

Roger
 
Last edited:

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
To answer my own question, see bug 5913. That will teach me to post having not checked the bug list for a couple of days!
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
I'd be really grateful for comments on this issue. It seems to me to be a very serious bug likely to cause data loss.

The scenario is that you get a new UPS. You set it up to shut Freenas down when the battery is low. When the power is out and the battery gets low, then Freenas notices this and says it is shutting down. But then nothing happens for, say, five minutes, the UPS battery runs out, the Freenas server loses power while in normal operation and the pool is fried to a greater or lesser extent.

The only precondition is that you have (perhaps experimentally) set up this UPS or a previous one to shutdown after a fixed period on battery, and then removed this setting. According to common sense (I agree not reliable in itself), the NUT user manuals, and the Freenas GUI this setting should not be operative, and cannot in any case be altered.

There is an easy workaround once you know about the bug, but that is not the point.
 
Status
Not open for further replies.
Top