From 4a32b970bf2577981a383de2ecd6f801de9db692 Mon Sep 17 00:00:00 2001 From: tb365 Date: Wed, 8 Sep 2021 10:39:47 +0800 Subject: [PATCH] fix(region): hcso sync server fix --- pkg/multicloud/hcso/instance.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/multicloud/hcso/instance.go b/pkg/multicloud/hcso/instance.go index 6dcba0b0f8..ef79d2f2c9 100644 --- a/pkg/multicloud/hcso/instance.go +++ b/pkg/multicloud/hcso/instance.go @@ -774,6 +774,9 @@ func (self *SRegion) GetInstances() ([]SInstance, error) { func (self *SRegion) GetInstanceByID(instanceId string) (SInstance, error) { instance := SInstance{} err := DoGet(self.ecsClient.Servers.Get, instanceId, nil, &instance) + if instance.Status == "DELETED" { + return instance, errors.Wrap(cloudprovider.ErrNotFound, "GetInstanceByID") + } return instance, err }