Skip to content

Commit

Permalink
[issue-1088] send correct status (#1132)
Browse files Browse the repository at this point in the history
  • Loading branch information
katarzyna-kulpa authored Mar 28, 2024
1 parent 48c97f3 commit dee045f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/node/volumemgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -1110,8 +1110,10 @@ func (m *VolumeManager) createEventsForDriveUpdates(updates *driveUpdates) {
m.createEventForDriveStatusChange(
updDrive.CurrentState, updDrive.PreviousState.Spec.Status, updDrive.CurrentState.Spec.Status)
} else if updDrive.CurrentState.Spec.Status == apiV1.DriveStatusOffline {
if updDrive.CurrentState.Spec.Usage == apiV1.DriveUsageRemoved &&
updDrive.PreviousState.Spec.Usage == apiV1.DriveUsageRemoving {
if updDrive.CurrentState.Spec.Usage != updDrive.PreviousState.Spec.Usage &&
updDrive.CurrentState.Spec.Usage != apiV1.DriveUsageReleased &&
updDrive.CurrentState.Spec.Usage != apiV1.DriveUsageInUse &&
updDrive.CurrentState.Spec.Usage != apiV1.DriveUsageReleasing {
m.createEventForMissingDriveRemoved(updDrive.CurrentState)
}
}
Expand Down

0 comments on commit dee045f

Please sign in to comment.