Merge pull request #4120 from parryjacob/4112-allow-remove-unknown

Ignore more errors from EC2 API
This commit is contained in:
Nathan LeClaire
2017-06-05 11:54:34 -07:00
committed by GitHub

View File

@@ -951,7 +951,8 @@ func (d *Driver) terminate() error {
InstanceIds: []*string{&d.InstanceId},
})
if strings.HasPrefix(err.Error(), "unknown instance") {
if strings.HasPrefix(err.Error(), "unknown instance") ||
strings.HasPrefix(err.Error(), "InvalidInstanceID.NotFound") {
log.Warn("Remote instance does not exist, proceeding with removing local reference")
return nil
}