-
-
Notifications
You must be signed in to change notification settings - Fork 413
Teach upsdrvctl and drivers to talk socket protocol to their other selves
#1922
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 62 commits into
networkupstools:master
from
jimklimov:issue-1285-upsdrvquery
Apr 24, 2023
Merged
Teach upsdrvctl and drivers to talk socket protocol to their other selves
#1922
jimklimov
merged 62 commits into
networkupstools:master
from
jimklimov:issue-1285-upsdrvquery
Apr 24, 2023
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
…n_instcmd() and main_setvar() handlers [networkupstools#1285, networkupstools#1914]
…via socket protocol (upsrw etc.) [networkupstools#1285] Closes: networkupstools#1285
…ID, do not proceed to driver handler [networkupstools#1914]
….flag.allow_killpower" setting [networkupstools#1917] Closes: networkupstools#1917
…oduce NUT_DEBUG_LEVEL envvar support (if no "-D" option(s) among CLI args) [networkupstools#1915] Closes: networkupstools#1915
…cket protocol with (NO)BROADCAST option [networkupstools#1914]
…knowledge of conn_t involved [networkupstools#1914]\
…reload-or-exit" support [networkupstools#1903, networkupstools#1914]
…ka DRIVERS_MAIN_WITHOUT_MAIN now that it is referenced in main_setvar() [networkupstools#1903, networkupstools#1285]
…of string: satisfy platforms where snprintf is a macro [networkupstools#1914]
…eparation of string: satisfy platforms where snprintf is a macro [networkupstools#1914]
…eds fflush(stderr)
…est(upslog_flags, UPSLOG_STDERR) at all, not just that the debug is enabled; also mark upslog_start when we first call the method, even if debu is not currently verbose (may change at run time) [networkupstools#1903]
…ka DRIVERS_MAIN_WITHOUT_MAIN now that it is referenced in main_setvar()=>assign_debug_level() [networkupstools#1903, networkupstools#1285]
887d27a to
3b1ae65
Compare
…essages that we are *reloading or* restarting daemons
…et_exit_flag() instead [networkupstools#1923]
…nning driver first [networkupstools#1923] Closes: networkupstools#1923
This was referenced Apr 24, 2023
Open
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Jun 30, 2023
] Follow-up after core driver changes (main.c etc.) with `driver.state` networkupstools#1767, driver reload command networkupstools#1903, driver inter-instance communications via socket networkupstools#1922 and others. Also convert remaining single-digit X.Y versions to X.<Y+1>0 double-digits.
This was referenced Apr 12, 2024
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Dec 2, 2024
…vate use of timeval={-1,-1} as select(..., NULL) for indefinite wait [networkupstools#1922, networkupstools#2392, networkupstools#2686]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Dec 2, 2024
…vate use of timeval={-1,-1} as select(..., NULL) for indefinite wait [networkupstools#1922, networkupstools#2392, networkupstools#2686, networkupstools#2670]
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
feature
NUT protocols
service/daemon start/stop
General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
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.
As a follow-up to issue #1903, PR #1918 and discussion #1920, this PR adds a limited socket-protocol client to drivers (main.c) and upsdrvctl, so they can request
reload-or-erroron command-line to query the running instance of the driver. If it fails to reload some changed values, exit-code 2 can be seen (technicallySTAT_INSTCMD_INVALID), so e.g. nut-driver-enumerator can disable and redefine the service carefully.