k8snetworkplumbingwg / ovs-cni

Open vSwitch CNI plugin
Apache License 2.0
218 stars 70 forks source link

Cleanup ports after IPAM failure #259

Closed phoracek closed 1 year ago

phoracek commented 1 year ago

What this PR does / why we need it:

While most of the configuration gets cleaned up on ADD failure through the removal of containers netns, OVS ports do not.

In case port attachment succeeded but the following IPAM configuration failed, we end up with the port left behind.

With this patch, the port gets explicitly deleted on IPAM failure.

This fixes https://github.com/k8snetworkplumbingwg/ovs-cni/issues/258

Release note:

Cleanup after IPAM failure
qinqon commented 1 year ago

/lgtm /approve

kubevirt-bot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: phoracek, qinqon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/k8snetworkplumbingwg/ovs-cni/blob/main/OWNERS)~~ [phoracek] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment