Skip to content

Commit

Permalink
fix ovs bridge not deleted cause by port link not found (#2084)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Nov 28, 2022
1 parent 22abb8a commit 7d2e8ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/daemon/ovs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,10 @@ func linkIsAlbBond(link netlink.Link) (bool, error) {
func removeProviderNic(nicName, brName string) error {
nic, err := netlink.LinkByName(nicName)
if err != nil {
if _, ok := err.(netlink.LinkNotFoundError); ok {
klog.Warningf("failed to get nic by name %s: %v", nicName, err)
return nil
}
return fmt.Errorf("failed to get nic by name %s: %v", nicName, err)
}
bridge, err := netlink.LinkByName(brName)
Expand Down

0 comments on commit 7d2e8ea

Please sign in to comment.