mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix(region): account disconnect (#20076)
This commit is contained in:
@@ -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"
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user