From a147095bc29693ff89356546060584d89fa6dfa4 Mon Sep 17 00:00:00 2001 From: ioito Date: Wed, 9 Mar 2022 15:56:02 +0800 Subject: [PATCH] fix(region): host guest cnt for deleted --- pkg/compute/models/hosts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/compute/models/hosts.go b/pkg/compute/models/hosts.go index 9a2592eaed..b20117da34 100644 --- a/pkg/compute/models/hosts.go +++ b/pkg/compute/models/hosts.go @@ -2958,7 +2958,7 @@ func (manager *SHostManager) FetchGuestCnt(hostIds []string) map[string]*sGuestC return ret } guests := []SGuest{} - err := GuestManager.RawQuery().In("host_id", hostIds).NotEquals("hypervisor", api.HYPERVISOR_CONTAINER).All(&guests) + err := GuestManager.RawQuery().IsFalse("deleted").In("host_id", hostIds).NotEquals("hypervisor", api.HYPERVISOR_CONTAINER).All(&guests) if err != nil { log.Errorf("query host %s guests error: %v", hostIds, err) }