nut-driver attempts to start when mode=netclient in nut.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nut (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Nut seems to have three systemd units. When nut.conf contains "mode=netclient", there is a lengthy delay to system startup / shutdown because nut-driver cannot start/stop (the UPS is remote, so the user will have either not configured this file, or it will not find an attached UPS where one has been configured). Overall, this is not a very serious bug, but it adds >90 seconds to reboot time...long enough that I eventually got annoyed enough to spend time figuring out why...
Current outcome:
nut-server - attempts to start/stop, detects mode=netclient, writes status message and moves on (OK)
nut-driver - attempts to start/stop, configuration error, waits a long time before failing to start/stop (problem)
nut-client - attempts to start/stop, succeeds as required (OK).
Desired outcome:
nut-server - attempts to start/stop, detects mode=netclient, writes status message and moves on
nut-driver - attempts to start/stop, detects mode=netclient, writes status message and moves on
nut-client - attempts to start/stop, succeeds as required
Log output /var/log/syslog:
Oct 27 18:28:48 yggdrasil systemd[1]: nut-driver.service: Control process exited, code=exited, status=1/FAILURE
Oct 27 18:28:48 yggdrasil systemd[1]: nut-driver.service: Failed with result 'exit-code'.
Workaround:
This can be worked around by removing the nut package and only installing nut-client, but the configuration files suggest that setting mode=netclient should work. At the very least, the comment in nut.conf above this line should be updated to state that you should only install nut-client if you're planning to configure with mode=netclient.
Ubuntu Version:
20.10, 20.04 definitely.
Package Version:
2.7.4-12ubuntu1
I might add that the most noticable time-based impact here is on the shutdown end of things, rather than startup. It does take some time to fail on startup, but on shutdown it seems to have a 90 second wait before it fails...