Skip to content

Commit

Permalink
[fix] allow delete volume when status is error
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongpiger committed Jun 20, 2024
1 parent 8c6e84c commit b9d3c8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (s *cloud) DeleteVolume(volID string) error {
}

if vol.CanDelete() {
_, err := s.waitVolumeAchieveStatus(volID, volumeAvailableStatus)
_, err := s.waitVolumeAchieveStatus(volID, availableDeleteStatus)
if err != nil {
return err
}
Expand Down
1 change: 1 addition & 0 deletions pkg/cloud/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var (
var (
volumeArchivedStatus = lset.NewSet[string](VolumeAvailableStatus, VolumeInUseStatus)
volumeAvailableStatus = lset.NewSet[string](VolumeAvailableStatus)
availableDeleteStatus = lset.NewSet[string](VolumeAvailableStatus, VolumeErrorStatus)
)

const (
Expand Down

0 comments on commit b9d3c8d

Please sign in to comment.