Skip to content

Commit

Permalink
Merge pull request #33 from thomasferrandiz/main
Browse files Browse the repository at this point in the history
Make sure the CNI delete function does not fail when the json config is wrong
  • Loading branch information
thomasferrandiz authored Dec 5, 2022
2 parents 81fe81e + acb770d commit 18a3027
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 18a3027

Please sign in to comment.