File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -976,21 +976,14 @@ func (plugin *NetPlugin) Delete(args *cniSkel.CmdArgs) error {
976976
977977 // Query the network.
978978 if nwInfo , err = plugin .nm .GetNetworkInfo (networkID ); err != nil {
979-
980979 if ! nwCfg .MultiTenancy {
981- // attempt to release address associated with this Endpoint id
982- // This is to ensure clean up is done even in failure cases
983- log .Errorf ("[cni-net] Failed to query network: %v" , err )
984- telemetry .LogAndSendEvent (plugin .tb , fmt .Sprintf ("Release ip by ContainerID (network not found):%v" , args .ContainerID ))
985- err = plugin .ipamInvoker .Delete (nil , nwCfg , args , nwInfo .Options )
986- if err != nil {
987- return plugin .RetriableError (fmt .Errorf ("failed to release address(no network): %w" , err ))
988- }
980+ log .Printf ("[cni-net] Failed to query network: %v" , err )
981+ // Log the error but return success if the network is not found.
982+ // if cni hits this, mostly state file would be missing and it can be reboot scenario where
983+ // container runtime tries to delete and create pods which existed before reboot.
984+ err = nil
985+ return err
989986 }
990-
991- // Log the error but return success if the endpoint being deleted is not found.
992- err = nil
993- return err
994987 }
995988
996989 endpointID := GetEndpointID (args )
You can’t perform that action at this time.
0 commit comments