Merge pull request #12131 from tb365/automated-cherry-pick-of-#12130-upstream-release-3.8

Automated cherry pick of #12130: fix(region): hcso sync server fix
This commit is contained in:
Zexi Li
2021-09-08 10:47:24 +08:00
committed by GitHub
+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
}