Skip to content

Commit

Permalink
Merge pull request #83 from Luap99/drop-error-logging
Browse files Browse the repository at this point in the history
Remove error logging for deleteFromNetwork call
  • Loading branch information
openshift-merge-robot authored Dec 4, 2020
2 parents b980886 + acc88df commit b6cbe99
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/ocicni/ocicni.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,7 @@ func (plugin *cniNetworkPlugin) TearDownPodWithContext(ctx context.Context, podN

return plugin.forEachNetwork(&podNetwork, true, func(network *cniNetwork, podNetwork *PodNetwork, rt *libcni.RuntimeConf) error {
if err := network.deleteFromNetwork(ctx, rt, plugin.cniConfig); err != nil {
logrus.Errorf("Error while removing pod from CNI network %q: %s", network.name, err)
return err
return fmt.Errorf("Error while removing pod from CNI network %q: %s", network.name, err)
}
return nil
})
Expand Down Expand Up @@ -771,7 +770,6 @@ func (network *cniNetwork) checkNetwork(ctx context.Context, rt *libcni.RuntimeC
func (network *cniNetwork) deleteFromNetwork(ctx context.Context, rt *libcni.RuntimeConf, cni *libcni.CNIConfig) error {
logrus.Infof("About to del CNI network %s (type=%v)", network.name, network.config.Plugins[0].Network.Type)
if err := cni.DelNetworkList(ctx, network.config, rt); err != nil {
logrus.Errorf("Error deleting network %s: %v", network.name, err)
return err
}
return nil
Expand Down

0 comments on commit b6cbe99

Please sign in to comment.