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 14c9840 commit 6a392df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/daemon/ovs.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,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 6a392df

Please sign in to comment.