Skip to content

Commit

Permalink
Make sure the CNI delete function does not fail when the json config …
Browse files Browse the repository at this point in the history
…is wrong

Otherwise, the kubelet gets stuck deleting a pod
  • Loading branch information
thomasferrandiz committed Nov 21, 2022
1 parent 81fe81e commit acb770d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flannel_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ func doCmdDel(args *skel.CmdArgs, n *NetConf) (err error) {

nc := &types.NetConf{}
if err = json.Unmarshal(netConfBytes, nc); err != nil {
return fmt.Errorf("failed to parse netconf: %v", err)
// Interface will remain in the bridge but will be removed when rebooting the node
fmt.Fprintf(os.Stderr, "failed to parse netconf: %v", err)
return nil
}

return invoke.DelegateDel(context.TODO(), nc.Type, netConfBytes, nil)
Expand Down

0 comments on commit acb770d

Please sign in to comment.