File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
pkg/compute/regiondrivers Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ import (
2929 randutil "yunion.io/x/pkg/util/rand"
3030 "yunion.io/x/pkg/util/regutils"
3131 "yunion.io/x/pkg/util/secrules"
32- "yunion.io/x/pkg/util/sets"
3332 "yunion.io/x/pkg/utils"
3433 "yunion.io/x/sqlchemy"
3534
@@ -888,7 +887,12 @@ func (self *SKVMRegionDriver) RequestSyncDiskStatus(ctx context.Context, userCre
888887 originStatus , _ := task .GetParams ().GetString ("origin_status" )
889888 status , _ := res .GetString ("status" )
890889 if status == api .DISK_EXIST {
891- if sets .NewString (api .DISK_UNKNOWN , api .DISK_REBUILD_FAILED ).Has (originStatus ) {
890+ if utils .IsInArray (originStatus , []string {
891+ api .DISK_UNKNOWN ,
892+ api .DISK_REBUILD_FAILED ,
893+ api .DISK_ATTACHING ,
894+ api .DISK_DETACHING ,
895+ }) {
892896 diskStatus = api .DISK_READY
893897 } else {
894898 diskStatus = originStatus
You can’t perform that action at this time.
0 commit comments