fix: handle 'delayed' state in sync_completed parsing#786
Open
mehrdadbn9 wants to merge 2 commits intoprometheus:masterfrom
Open
fix: handle 'delayed' state in sync_completed parsing#786mehrdadbn9 wants to merge 2 commits intoprometheus:masterfrom
mehrdadbn9 wants to merge 2 commits intoprometheus:masterfrom
Conversation
When multiple MD RAID arrays share physical devices and a check/resync is triggered for more than one, the kernel delays the action on all but one device. In this case, sync_completed contains 'delayed' instead of 'none' or 'N / M'. This fix adds 'delayed' to the list of special values that should not be parsed as integers. Fixes prometheus#770 Related: prometheus/node_exporter#3500
- Add TestMdraidDelayedSyncCompleted to verify delayed state handling - Include complete test data with delayed sync_completed value - Test verifies SyncCompleted=0, SyncAction='resync', and all component states Fixes prometheus#786
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.
Summary
delayedas a special value in sync_completed parsing (similar tonone)sync_completedcontainsdelayedinstead ofnoneorN / MProblem
The current code fails when
sync_completedcontainsdelayed:Solution
Add
delayedto the list of special values that should not be parsed as integers.Testing
none,delayed,123 / 456,invalidFixes #770
Related: prometheus/node_exporter#3500