Conversation
300265c to
7d515fa
Compare
Add fix for mdadm devices in state `resync=PENDING`. * Update test and fixture.
7d515fa to
64b8259
Compare
Closed
juliusv
reviewed
Sep 18, 2016
collector/mdadm_linux.go
Outdated
| // If device is syncing at the moment, get the number of currently synced bytes, | ||
| // otherwise that number equals the size of the device. | ||
| if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") && !strings.Contains(lines[j], "resync=DELAYED") { | ||
| if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") && !strings.Contains(lines[j], "resync=DELAYED") && !strings.Contains(lines[j], "resync=PENDING") { |
Member
There was a problem hiding this comment.
Can this take more values than DELAYED or PENDING? Should we just check if the line starts with resync=?
Member
Author
There was a problem hiding this comment.
I looked over the linux source0 and found that these are the only 2 cases. There is the other style of line that sometimes says resync =. Maybe we can make the parser smarter based on the source. It also seems like it always uses a \t in the code to print out that line. I can adjust the Contains
35682c9 to
ec1683e
Compare
juliusv
reviewed
Sep 19, 2016
collector/mdadm_linux.go
Outdated
Member
There was a problem hiding this comment.
\u0009 -> \t will be more understandable for people.
Member
Author
There was a problem hiding this comment.
I wasn't sure if that was valid syntax, thanks, will fix.
Update `Contains` matching for `resync=`
ec1683e to
afac1f7
Compare
Member
|
👍 thanks |
Merged
tamcore
pushed a commit
to gitgrave/node_exporter
that referenced
this pull request
Oct 22, 2024
Add more needed variants of cpuinfo for mips64 and mips64le. Signed-off-by: Ben Kochie <superq@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add fix for mdadm devices in state
resync=PENDING.