Skip to content

Commit

Permalink
fix(region): account disconnect (#20076)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioito authored Apr 18, 2024
1 parent c4e5075 commit 34e1a46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cloudcommon/db/statusbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"yunion.io/x/sqlchemy"

"yunion.io/x/onecloud/pkg/apis"
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/httperrors"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/util/logclient"
Expand Down Expand Up @@ -104,7 +105,7 @@ func statusBaseSetStatus(ctx context.Context, model IStatusBaseModel, userCred m
}
OpsLog.LogEvent(model, ACT_UPDATE_STATUS, notes, userCred)
success := true
if strings.Contains(status, "fail") || status == apis.STATUS_UNKNOWN {
if strings.Contains(status, "fail") || status == apis.STATUS_UNKNOWN || status == api.CLOUD_PROVIDER_DISCONNECTED {
success = false
}
logclient.AddSimpleActionLog(model, logclient.ACT_UPDATE_STATUS, notes, userCred, success)
Expand Down

0 comments on commit 34e1a46

Please sign in to comment.