-
Notifications
You must be signed in to change notification settings - Fork 33
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
[issue-1088] alerts for missing disks #1102
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1102 +/- ##
==========================================
+ Coverage 72.79% 72.81% +0.02%
==========================================
Files 63 63
Lines 8953 8961 +8
==========================================
+ Hits 6517 6525 +8
Misses 2148 2148
Partials 288 288
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pkg/node/volumemgr.go
Outdated
@@ -1110,6 +1110,12 @@ func (m *VolumeManager) createEventsForDriveUpdates(updates *driveUpdates) { | |||
m.createEventForDriveStatusChange( | |||
updDrive.CurrentState, updDrive.PreviousState.Spec.Status, updDrive.CurrentState.Spec.Status) | |||
} | |||
if updDrive.CurrentState.Spec.Status == apiV1.DriveStatusOffline { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that we get two same events the one generated in line 1111 and this new one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For normal flow is should not be possible, however to to be 100% safe I've changed the code to handle this situation. Thank you!
Purpose
Resolves ##1088
Sending DriveSuccessfullyRemoved alert for successfully removed missing disks
PR checklist
Testing
Whole regression tests