fix(region): hcso sync server fix

This commit is contained in:
tb365
2021-09-08 10:42:16 +08:00
parent 328dcf8ebb
commit a9a1c64ef0
+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
}