fix(region): hcso sync server fix

This commit is contained in:
tb365
2021-09-08 10:42:32 +08:00
parent d10353a824
commit 4a32b970bf
+3
View File
@@ -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
}