Skip to content

clients/upsmon.c et al: introduce SHUTDOWNEXIT boolean/delay-length option [#2133]#2133

Merged
jimklimov merged 4 commits intonetworkupstools:masterfrom
jimklimov:upsmon-fsd-noexit
Oct 28, 2023
Merged

clients/upsmon.c et al: introduce SHUTDOWNEXIT boolean/delay-length option [#2133]#2133
jimklimov merged 4 commits intonetworkupstools:masterfrom
jimklimov:upsmon-fsd-noexit

Conversation

@jimklimov
Copy link
Copy Markdown
Member

As suggested by mailing list: "secondary" systems that take long to stop their workloads can get a power-cut too early because their upsmon exits just after calling SHUTDOWNCMD and so allow the primary to stop and killpower. This PR makes such behavior configurable - adding an option for upsmon to linger after telling its system to shut down.

TODO/Idea for further improvement: Handle numbers as the time to linger, not as a boolean?

@jimklimov jimklimov added enhancement service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug upsmon Shutdowns and overrides and battery level triggers Issues and PRs about system shutdown, especially if battery charge/runtime remaining is involved labels Oct 27, 2023
@jimklimov jimklimov added this to the 2.8.1 milestone Oct 27, 2023
…ation, now it can [networkupstools#2133]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov
Copy link
Copy Markdown
Member Author

Ah, the pedantic strictness... now the "noreturn" annotation is no longer valid - the method does not ALWAYS exit() the program :D

@jimklimov
Copy link
Copy Markdown
Member Author

Yay, finally, issues in jenkins-dynamatrix got ironed out and the commit status backref URLs work - pointing to the log of the failed matrix cell sub-stage right from github! :)

…finite delay between SHUTDOWNCMD and exit() [networkupstools#2133]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…)) annotation, now it can [networkupstools#2133]"

This reverts commit 2e72638.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov changed the title clients/upsmon.c et al: introduce SHUTDOWNEXIT boolean option [#2133] clients/upsmon.c et al: introduce SHUTDOWNEXIT boolean/delay-length option [#2133] Oct 28, 2023
@jimklimov jimklimov merged commit c54c30f into networkupstools:master Oct 28, 2023
@jimklimov jimklimov deleted the upsmon-fsd-noexit branch October 28, 2023 21:06
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
…UTDOWNEXIT` setting [networkupstools#3084, networkupstools#2133]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug Shutdowns and overrides and battery level triggers Issues and PRs about system shutdown, especially if battery charge/runtime remaining is involved upsmon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant