Package: nut
Version: 2.7.2-4
Severity: important

The POWEROFF_WAIT option in nut.conf does not work (has no effect).

I have a suspicion that it has something to do with systemd handling system shutdowns nowadays, though it's too complex for me to investigate further and find any proof (other than /sbin/shutdown and /sbin/poweroff pointing to /bin/systemctl, which does not prove anything).

This bug introduces quite a regression I believe is worth fixing in Jessie (even if it turns out to be fixed in later versions). Also, it becomes especially hilarious together with #835555 - nut also doesn't send the command to kill the power; so nut doesn't handle the case when your UPS supports cutting the power, AND it doesn't handle the situation when it does not. Seriously, did no one notice a 100% broken package BEFORE shipping Jessie?.. A package that manages power supply, of all things. Hence the "important" severity.



Details:
If the command for the UPS to kill the power is sent when AC power is already back, my UPS ignores it. (And it's APC, so I really didn't expect that kind of thing from them.) So, there is a risk to have all my machines require a manual restart after a power failure.
And nut has a workaround just for this case...

Actions required:
- Add "POWEROFF_WAIT=15m" line in /etc/nut/nut.conf

Intended behaviour:
- After an emergency shutdown triggerd by NUT, the system is not
powered down, only halted. After a timeout (15 minutes in this
example) it reboots, in case the UPS did not cut the power
for some reason.

Actual behaviour:
- The system is always powered off, ignoring the option added.



Minor notes:

- man nut.conf has a section about this option which directs me to /usr/share/doc/nut/docs/shutdown.txt.gz , which is not there anymore.

- man nut.conf does say that "if you want to specify time in seconds, use the 's' suffix", but it does not say which suffix should I use if I do NOT want to specify time in seconds. According to the example below, using "m" is also possible - apparently, for minutes, but I was wondering if "m" is already deprecated (along with shutdown.txt.gz mentioned above) and I should use no suffix by default... I don't want to do a real power failure test again just to find out.



-- System Information:
Debian Release: 8.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.18-aufs (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nut depends on:
ii nut-client 2.7.2-4
ii nut-server 2.7.2-4

nut recommends no packages.

nut suggests no packages.

-- no debconf information


--
darkpenguin

Reply via email to