Skip to content

Commit

Permalink
Unset the format request when a drive becomes unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
Praveenrajmani authored and wlan0 committed Aug 25, 2021
1 parent ba58e5a commit 7f2e75b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/node/discovery/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ func syncDriveStatesOnDiscovery(existingObj *directcsi.DirectCSIDrive, localDriv
existingObj.Status.TotalCapacity = localDrive.Status.TotalCapacity
if localDrive.Status.DriveStatus == directcsi.DriveStatusUnavailable {
existingObj.Status.DriveStatus = directcsi.DriveStatusUnavailable
existingObj.Status.Conditions = localDrive.Status.Conditions
existingObj.Spec.DirectCSIOwned = false
existingObj.Spec.RequestedFormat = nil
}
// Capacity sync
allocatedCapacity := localDrive.Status.AllocatedCapacity
Expand Down

0 comments on commit 7f2e75b

Please sign in to comment.