[Nut-upsuser] Semantic relationships between shudown.stayoff, shutdown.return, and ups.start.auto

Rich Wrenn rwrenn at ddn.com
Tue Jan 17 15:50:12 UTC 2012


Arnaud,

I've looked at the patch and it appears correct.  I will try to test it today.

Thank you very much,
Rich

-----Original Message-----
From: Arnaud Quette [mailto:aquette.dev at gmail.com] 
Sent: Tuesday, January 17, 2012 8:36 AM
To: Rich Wrenn
Cc: nut-upsuser at lists.alioth.debian.org
Subject: Re: [Nut-upsuser] Semantic relationships between shudown.stayoff, shutdown.return, and ups.start.auto

Hi Rich,

2012/1/15 Rich Wrenn <rwrenn at ddn.com>:
> Charles,
>
> Thanks for your reply, however..
>
>>> Nut-names.txt states that
>>> 1.       ups.start.auto controls whether the UPS starts when mains is (re)applied.
>>> 2.       shutdown.stayoff causes "turn off the load possibly after a delay and remain even if power returns".
>>> 3.       shutdown.return causes "turn off the load possibly after a delay and return when power is back".
>>>
>>> 1 seems to conflict with 2 and 3.  That is, 2 implies that ups.start.auto=no and 3 implies that ups.start.auto=yes.
>
>> My understanding of the "ups.start.auto" setting is that it only applies when an explicit shutdown command has not been > given (and therefore would be overridden by one of the shutdown.* commands, if NUT is configured to manage the shutdown > process).
>
> That would be reasonable.  If this is the intent then I suggest that that be said in the description of ups.start.auto in nut_names.txt.

indeed, though currently, only Eaton exposes this data (USB/HID, SHUT and SNMP), since it's part of the legacy from MGE...
which also explains why it's not present on the Powerware side (XCP)

>> That said, I'll defer to someone who knows the specifics of the Eaton hardware for information on how it should work.  > The UPS firmware has a lot of leeway in how the commands and settings are interpreted.
>
> My experience so far with the Evolution 1550 is that shutdown.stayoff only works correctly if ups.start.auto=no and that shutdown.return only works correctly if ups.start.auto=yes.  Given that, shouldn't the NUT driver for this UPS set ups.start.auto as part of these shutdown commands?

I confirm what you already saw: ups.start.auto has an impact on the shutdown functions.
For the sake of coherence, I've prepared the attached patch, which will check for the right ups.start.auto before applying the shutdown commands.
This applies to both usbhid-ups and newmge-shut, and will not impact any other devices but Eaton.

I'm currently not able to commit it, since there is an outage on Alioth (hosting our SCM).

cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://www.debian.org Free Software Developer - http://arnaud.quette.free.fr/


More information about the Nut-upsuser mailing list