FS#76829 - [apcupsd] service won't start when no network

Attached to Project: Community Packages
Opened by Dmytro Bagrii (dimich) - Thursday, 15 December 2022, 00:11 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Florian Pritz (bluewind)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

apcupsd.service depends on network-online.target for some reason.
If network interface is configured to use DHCP and network is unavailable (e.g. remote equipment is powered off) apcupsd.service won't start and apcupsd will not shutdown/hibernate system on timeout or battery level threshold.

apcupsd 3.14.14-7
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:05 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/apcupsd/issues/2
Comment by Toolybird (Toolybird) - Thursday, 15 December 2022, 20:31 GMT
`Wants=network-online.target' was added because of  FS#73607  to support snmp. Not sure if both scenarios can be supported. I'd just work around the issue and not use DHCP.
Comment by Dmytro Bagrii (dimich) - Saturday, 17 December 2022, 04:32 GMT
I worked around it by overriding apcupsd.service in /etc/systemd/ with dependency removed. But default service configuration may cause locally connected UPS to fail it's main job: shutdown the system properly on power failure. Also it may cause deep battery discharge.
Actually "sendto: Network is unreachable" is not a failure. Host with SNMP server may be unreachable for many reasons.

Maybe separate service units for local and network configurations as a compromise?

Loading...