Skip to content

Commit

Permalink
Merge pull request #10508 from wongma7/dhcpnotfound
Browse files Browse the repository at this point in the history
Treat InvalidDhcpOptionsId.NotFound as already-deleted
  • Loading branch information
k8s-ci-robot authored Dec 30, 2020
2 parents dded75e + 7e9392e commit 0e34ce1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/resources/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,10 @@ func DeleteDhcpOptions(cloud fi.Cloud, r *resources.Resource) error {
}
_, err := c.EC2().DeleteDhcpOptions(request)
if err != nil {
if IsDependencyViolation(err) {
if awsup.AWSErrorCode(err) == "InvalidDhcpOptionsID.NotFound" {
klog.V(2).Infof("Got InvalidDhcpOptionsID.NotFound error deleting DhcpOptions %q; will treat as already-deleted", id)
return nil
} else if IsDependencyViolation(err) {
return err
}
return fmt.Errorf("error deleting DhcpOptions %q: %v", id, err)
Expand Down

0 comments on commit 0e34ce1

Please sign in to comment.