We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e513017 + 7e91841 commit 38f18d2Copy full SHA for 38f18d2
plugins/meta/sbr/main.go
@@ -360,6 +360,13 @@ func tidyRules(iface string) error {
360
361
link, err := netlink.LinkByName(iface)
362
if err != nil {
363
+ // If interface is not found by any reason it's safe to ignore an error. Also, we don't need to raise an error
364
+ // during cmdDel call according to CNI spec:
365
+ // https://github.com/containernetworking/cni/blob/main/SPEC.md#del-remove-container-from-network-or-un-apply-modifications
366
+ _, notFound := err.(netlink.LinkNotFoundError)
367
+ if notFound {
368
+ return nil
369
+ }
370
log.Printf("Failed to get link %s: %v", iface, err)
371
return fmt.Errorf("Failed to get link %s: %v", iface, err)
372
}
0 commit comments