From 027f5749fa2cc13848e600460b27c141e133602e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=88=E8=BD=A9?= Date: Mon, 15 Apr 2024 14:10:39 +0800 Subject: [PATCH] fix(region): allow not idle account sync (#19982) --- pkg/compute/models/cloudaccounts.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/compute/models/cloudaccounts.go b/pkg/compute/models/cloudaccounts.go index fa4989947a..a1f775285e 100644 --- a/pkg/compute/models/cloudaccounts.go +++ b/pkg/compute/models/cloudaccounts.go @@ -685,10 +685,6 @@ func (acnt *SCloudaccount) PerformSync(ctx context.Context, userCred mcclient.To return nil, httperrors.NewInvalidStatusError("Account disabled") } - if acnt.SyncStatus != api.CLOUD_PROVIDER_SYNC_STATUS_IDLE { - return nil, httperrors.NewInvalidStatusError("Account is not idle") - } - syncRange := SSyncRange{SyncRangeInput: input} if syncRange.FullSync || len(syncRange.Region) > 0 || len(syncRange.Zone) > 0 || len(syncRange.Host) > 0 || len(syncRange.Resources) > 0 { syncRange.DeepSync = true