From 964a1a4d7ca851302dbd5d4a5f47baf346556d6b Mon Sep 17 00:00:00 2001 From: ioito Date: Wed, 12 Oct 2022 16:35:31 +0800 Subject: [PATCH] fix(region): purge vm by tags --- pkg/compute/models/hosts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/compute/models/hosts.go b/pkg/compute/models/hosts.go index 7919cd2da0..511c2fed45 100644 --- a/pkg/compute/models/hosts.go +++ b/pkg/compute/models/hosts.go @@ -2487,8 +2487,8 @@ func (self *SHost) SyncHostVMs(ctx context.Context, userCred mcclient.TokenCrede for i := 0; i < len(commondb); i += 1 { skip, key := skipFunc(commonext[i]) if skip { - log.Infof("skip server %s(%s) sync for delete with system tag key: %s", commonext[i].GetName(), commonext[i].GetGlobalId(), key) - err := commondb[i].syncRemoveCloudVM(ctx, userCred) + log.Infof("delete server %s(%s) with system tag key: %s", commonext[i].GetName(), commonext[i].GetGlobalId(), key) + err := commondb[i].purge(ctx, userCred) if err != nil { syncResult.DeleteError(err) continue