-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Clean up dummy-ups
code, behavior and logs; added NUT_DEBUG_PID
option
#2118
Merged
Conversation
This file contains 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: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
…based dummy-ups; check for invalid FD for good measure (to avoid fstat() on that) Signed-off-by: Jim Klimov <[email protected]>
…y short "device_path" to stat the paths Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added
enhancement
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
labels
Oct 18, 2023
Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
…x_start_drivers() if debugging Signed-off-by: Jim Klimov <[email protected]>
…imeout and explain why Signed-off-by: Jim Klimov <[email protected]>
…tching expression and explain why Signed-off-by: Jim Klimov <[email protected]>
…to help log readability Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
…include PID number in debug-level identifiers Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
jimklimov
changed the title
Clean up
Clean up Oct 18, 2023
dummy-ups
code, behavior and logsdummy-ups
code, behavior and logs; added NUT_DEBUG_PID
option
❌ Build nut 2.8.0.987-master failed (commit 35f4c352b8 by @jimklimov) |
… in testgroup*() Signed-off-by: Jim Klimov <[email protected]>
…; revise upsd stopping after testcase_upsd_allow_no_device() Signed-off-by: Jim Klimov <[email protected]>
* report why a test case failed sanity-checks; * avoid grep output spilling to test log to avoid confusion; * revise that exactly expected port count was seen (that was the confusion); * use log_*() in that sanity-check block Signed-off-by: Jim Klimov <[email protected]>
✅ Build nut 2.8.0.988-master completed (commit 0e885b157a by @jimklimov) |
This confuses CI log analyzer Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Jul 30, 2024
…issed before [networkupstools#2118] Signed-off-by: Jim Klimov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
enhancement
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.
This PR started as an investigation into occasional NIT (NUT Integration Test) script failures, and so far stumbled on a number of imperfections in the dummy-ups driver - so started with those.
Updated with NIT test-script fixes as well.
NOTE: Strange behavior noted on WSL2 Ubuntu builds (maybe the VM is just slow now) that both
upsd
anddummy-ups
daemons logged stuff in bursts separated by roughly 10 sec, and those logs took a while to appear on display. There seemed to be a considerable delay between driver start, and readiness, and socket creation, and upsd connection to that socket, and DUMPALL request, and lots of info streaming until DUMPDONE marker - took about a minute overall for that test case initialization, and almost 3 min for the script. On other systems it goes at 1 sec cadence and all test cases complete in 20 sec.UPDATE: Yeah, a laggy VM, huge load average with no real CPU load - nothing a
wsl --shutdown
could not fix.To make sense of that wall of text, added
NUT_DEBUG_PID
optional envvar support to OPTIONALLY log with non-zero debug level and PIDs, like:instead of plain
This allows NIT mixed log from 4 daemons to be better understandable (adding a name might be better?) and I suppose can help systems that run all NUT programs as one logged bundle - e.g. containers like HA plugins - without a syslog/journal that would add identifiers to each line.