Skip to content

Commit

Permalink
fix(Idempotent): make volume provisioning idempotent (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil Mohan <[email protected]>
Co-authored-by: praveengt <[email protected]>
  • Loading branch information
akhilerm and praveengt authored Apr 21, 2021
1 parent c1a7cf9 commit 489dcfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/device/device-util.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ func CreateVolume(vol *apis.DeviceVolume) error {
return err
}
if len(pList) > 0 {
klog.Errorf("Partition %s already exist", partitionName)
return errors.New("Already exist")
klog.Infof("Partition %s already exist, Skipping creation", partitionName)
// Making Volume creation Idempotent
return nil
}
disk, start, err := findBestPart(diskMetaName, capacityMiB)
if err != nil {
Expand Down

0 comments on commit 489dcfc

Please sign in to comment.