mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
Merge pull request #4304 from ioito/hotfix/qx-ignore-cloud-account-health-status
fix: 支持忽略cloudaccount健康检查
This commit is contained in:
@@ -680,6 +680,9 @@ func (self *SCloudaccount) importSubAccount(ctx context.Context, userCred mcclie
|
||||
newCloudprovider.AccessUrl = self.AccessUrl
|
||||
newCloudprovider.Enabled = true
|
||||
newCloudprovider.Status = api.CLOUD_PROVIDER_CONNECTED
|
||||
if !options.Options.CloudaccountHealthStatusCheck {
|
||||
self.HealthStatus = api.CLOUD_PROVIDER_HEALTH_NORMAL
|
||||
}
|
||||
newCloudprovider.HealthStatus = self.HealthStatus
|
||||
newCloudprovider.Name = newName
|
||||
if !self.AutoCreateProject || len(self.ProjectId) > 0 {
|
||||
@@ -1390,6 +1393,9 @@ func (account *SCloudaccount) probeAccountStatus(ctx context.Context, userCred m
|
||||
account.IsOnPremise = factory.IsOnPremise()
|
||||
account.HasObjectStorage = factory.IsSupportObjectStorage()
|
||||
account.Balance = balance
|
||||
if !options.Options.CloudaccountHealthStatusCheck {
|
||||
status = api.CLOUD_PROVIDER_HEALTH_NORMAL
|
||||
}
|
||||
account.HealthStatus = status
|
||||
account.ProbeAt = timeutils.UtcNow()
|
||||
account.Version = version
|
||||
|
||||
@@ -73,7 +73,8 @@ type ComputeOptions struct {
|
||||
DefaultRdsQuota int `default:"10" help:"Common RDS quota per tenant, default 10"`
|
||||
DefaultCacheQuota int `default:"10" help:"Common ElasticCache quota per tenant, default 10"`
|
||||
|
||||
SystemAdminQuotaCheck bool `help:"Enable quota check for system admin, default False" default:"false"`
|
||||
SystemAdminQuotaCheck bool `help:"Enable quota check for system admin, default False" default:"false"`
|
||||
CloudaccountHealthStatusCheck bool `help:"Enable cloudaccount health status check, default True" default:"true"`
|
||||
|
||||
BaremetalPreparePackageUrl string `help:"Baremetal online register package"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user