Skip to content

upsnotify: failed to notify about ..., will not spam more about it

Jim Klimov edited this page Nov 15, 2023 · 1 revision

Questions afloat regarding upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it: with some service frameworks (systemd, kubernetes et al from what I'm told) there are hooks to let the managed programs tell the framework that they completed initialization and are ready to serve requests -- rather than the framework assuming that "forking happened, means server is ready". Similarly there are watchdog heartbeats, notifications of planned graceful exit, etc.

Currently NUT has an extensible upsnotify() method in common.c to handle these, with one implementation for systemd (as of NUT v2.8.1 release).

Since the lack of "tech" may be a build error (e.g. people forgot libsystemd-dev or similar in their build environment), or some run-time inability to send a message can be an admin error (e.g. not running under systemd properly), the method notifies once that it can not interact with such messaging.

On some platforms this is seen as unfortunate noise, on others it is something people can fix by reconfiguration or rebuild, and benefit from tighter service integration. On yet others, such framework facilities exist, but NUT codebase does not know about them -- and this can tickle someone to post a PR to teach NUT about it (or even to improve their favorite OS with the ability first).

Overall, these messages are not a bug but a feature :)

Clone this wiki locally