# {{ ansible_managed }} # upsd binds explicit addresses (see upsd.conf), but the packaged unit only # orders itself After=network.target -- which is satisfied when networking # STARTS, not when an address actually exists. The shipped unit even carries # these two lines commented out, because upstream knows the case. # # On 2026-08-28 the host came up and upsd tried to bind 11 seconds into boot, # before NetworkManager had assigned the address: # upsd: not listening on {{ ups_listen_addr }} port {{ ups_listen_port }} # upsd: Fatal error: some listening interfaces were not available # It then burned all five of the default restart attempts inside one second, # tripped the start limit, and stayed dead. truenas monitors this host as a # SLAVE (MONITOR cyberpower@{{ ups_listen_addr }}:{{ ups_listen_port }}), so # it alarmed NOCOMM continuously until someone noticed. The UPS driver itself # was fine throughout -- only the server that publishes its state was gone. # # NetworkManager-wait-online is enabled on this host, so network-online.target # genuinely waits for addresses rather than just for the service to start. # # The restart settings are belt and braces: StartLimitIntervalSec=0 removes the # rate limit so a slow address can never exhaust the attempts, and RestartSec # spaces the retries out instead of hammering five times in a second. [Unit] Wants=network-online.target After=network-online.target StartLimitIntervalSec=0 [Service] Restart=on-failure RestartSec={{ ups_server_restart_sec }}