fix: avoid check region log every time when account status is unknown

This commit is contained in:
Qu Xuan
2020-11-11 15:25:37 +08:00
parent 7123a8fc28
commit c2c9edd9c6
+3 -1
View File
@@ -2413,8 +2413,10 @@ func (account *SCloudaccount) probeAccountStatus(ctx context.Context, userCred m
case cloudprovider.ErrNoBalancePermission:
status = api.CLOUD_PROVIDER_HEALTH_NO_PERMISSION
default:
log.Errorf("manager.GetBalance %s fail %s", account.Name, err)
status = api.CLOUD_PROVIDER_HEALTH_UNKNOWN
if account.Status != status {
logclient.AddSimpleActionLog(account, logclient.ACT_PROBE, errors.Wrapf(err, "GetBalance"), userCred, false)
}
}
}
version := manager.GetVersion()