-
-
Notifications
You must be signed in to change notification settings - Fork 420
Description
Hi!
I don't know if this is a bug or a misconfiguration but here is what happened.
I have 2 machines, one is netserver other is netclient.
The netserver is connected through usb to a device.model: Back-UPS RS 550G with the following config
[ups]
driver = usbhid-ups
port = auto
onlinedischarge_calibration = 1
Both of the machines running Ubuntu 24.04.1 LTS with nut version 2.8.1-3.1ubuntu2.
The ups seems to calibrate itself every two weeks and the last one was on:
2025-01-29T14:39:04.808340+01:00 server nut-monitor[2772730]: UPS ups@localhost: administratively OFF or asleep
2025-01-29T14:39:04.816059+01:00 server nut-monitor[1551623]: Network UPS Tools upsmon 2.8.1
2025-01-29T14:39:14.810120+01:00 server nut-monitor[2772730]: UPS ups@localhost: no longer administratively OFF or asleep
2025-01-29T14:39:14.818648+01:00 server nut-monitor[1551648]: Network UPS Tools upsmon 2.8.1
Ubuntu has this function that when a lib used by a process is upgraded it restarts the corresponding systemd unit so it uses the updated lib.
Recently a bunch of libs were updated and when nut restarted on the netserver the netclient machine shut itself down.
At first I did not understand what happened, so after manually starting netclient and checked the logs I could see this:
2025-01-30T19:57:28.515107+01:00 client nut-monitor[3178]: Poll UPS [ups@10.90.1.1] failed - Write error: Broken pipe
2025-01-30T19:57:28.515556+01:00 client nut-monitor[3178]: Communications with UPS ups@10.90.1.1 lost
2025-01-30T19:57:28.515684+01:00 client nut-monitor[3178]: UPS [ups@10.90.1.1] was last known to be calibrating and currently is not communicating, assuming dead
2025-01-30T19:57:28.515770+01:00 client nut-monitor[3178]: Executing automatic power-fail shutdown
2025-01-30T19:57:28.520256+01:00 client nut-monitor[2709826]: Network UPS Tools upsmon 2.8.1
2025-01-30T19:57:28.520422+01:00 client nut-monitor[3178]: Auto logout and shutdown proceeding
2025-01-30T19:57:28.524341+01:00 client nut-monitor[2709831]: Network UPS Tools upsmon 2.8.1
2025-01-30T19:57:33.521944+01:00 client nut-monitor[3178]: Network UPS Tools upsmon 2.8.1
2025-01-30T19:57:33.540056+01:00 client shutdown[2709872]: Shutdown scheduled for Thu 2025-01-30 19:57:33 CET, use 'shutdown -c' to cancel.
2025-01-30T19:57:33.541551+01:00 client nut-monitor[3147]: Network UPS Tools upsmon 2.8.1
2025-01-30T19:57:33.543370+01:00 client systemd[1]: nut-monitor.service: Deactivated successfully.
2025-01-30T19:57:33.543530+01:00 client systemd[1]: nut-monitor.service: Consumed 3min 45.465s CPU time, 4.5M memory peak, 556.0K memory swap peak.
So it seems that the netclinet was thinking that the ups is still in calibrating mode when the netserver restarted its nut systemd service, and it was assuming the ups is dead and it immediately shutdown.
Of course I did not check what nut thinks about the state of the ups before the libs upgraded, but after that I could see that both netclient and netserver reports: ups.status: OL correctly.
Also yesterday and today again a bunch of libs were upgraded and nut was restarted on netserver and this time it did not trigger the shutdown (and I've checked this time and the status was still OL)
Now.. is this a bug that somehow the netclient did not get the memo that the ups is not in calibrating state, or something is misconfigured?