-
-
Notifications
You must be signed in to change notification settings - Fork 399
dstate: clean separation of older UPS-status based ALARM and modern alarm_*-driven ALARM #2934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jimklimov
merged 12 commits into
networkupstools:master
from
desertwitch:issue-2928-nolegacy
May 11, 2025
Merged
dstate: clean separation of older UPS-status based ALARM and modern alarm_*-driven ALARM #2934
jimklimov
merged 12 commits into
networkupstools:master
from
desertwitch:issue-2928-nolegacy
May 11, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: desertwitch <[email protected]>
…status [networkupstools#2931] Signed-off-by: desertwitch <[email protected]>
networkupstools#2931] Signed-off-by: desertwitch <[email protected]>
…workupstools#2931] Signed-off-by: desertwitch <[email protected]>
…s#2931] Signed-off-by: desertwitch <[email protected]>
Signed-off-by: desertwitch <[email protected]>
…unce dstate changes Signed-off-by: desertwitch <[email protected]>
Signed-off-by: desertwitch <[email protected]>
jimklimov
added a commit
to desertwitch/nut
that referenced
this pull request
May 10, 2025
…set and status set+commit+set+commit (without init in the middle) adds reported tokens [networkupstools#2934] Signed-off-by: Jim Klimov <[email protected]>
desertwitch
commented
May 11, 2025
desertwitch
commented
May 11, 2025
desertwitch
commented
May 11, 2025
desertwitch
commented
May 11, 2025
…set and status set+commit+set+commit (without init in the middle) adds reported tokens [networkupstools#2934] Signed-off-by: Jim Klimov <[email protected]>
9a3d0e7 to
c52b586
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
impacts-release-2.8.3
Issues reported against NUT release 2.8.3 (maybe vanilla or with minor packaging tweaks)
NUT protocols
refactor/fightwarn
PR or issue proposal to improve code maintainability without functional changes, or to fix warnings
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
follow up to #2931, fixes #2928
implements the ideas of #2931 (comment)
this PR amends the various involved parts to clean separation of legacy UPS-status coupled
ALARMand modern
alarm_-drivenALARM, which are decoupled from UPS status aside from the token itself.it removes making assumptions on legacy UPS-status coupled
ALARMand removes workarounds tryingto port any such legacy
ALARMstatuses into the UPS-status decoupledalarm_schema, because this wouldmean later having to couple them back to UPS-status again to be able to exit these alarm states. (within
dstate)this PR allows for both to co-exist peacefully with the only limitation being that a
ups.alarmdoes not getinjected when it is not otherwise published directly and manually by the (legacy) driver.
ups.alarmpublishedmanually by the (legacy) UPS driver will still raise appropriate (seperate) notifications, be tracked by
upsmonand function normally as if they were raised by the modern
alarm_functions (from theupsmonperspective).the
upsmondoes not care where indstateanALARMtoken was set, nor if done so by legacy or modern method.the tests now cover both legacy, mixed and modern scenarios respectively, as well as some more curious edge-cases.
further work is in progress to modernize the few remaining legacy drivers to use the
status_andalarm_functions.this ongoing work will later be published in separate PRs.