Closed courtland closed 1 year ago
Hi @courtland. Thanks for your PR.
I'm waiting for a k8snetworkplumbingwg member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
Thanks for opening this @courtland, I will review this during the next week.
Thanks for taking a look at this. I have improved the test, so hopefully it is good to merge. I am fine with waiting for #227 - building from my fork solves my immediate problem for the time being.
/retest
Looks good, thanks!
@courtland would you please fix this lint error?
/tmp/src/github.com/k8snetworkplumbingwg/ovs-cni/.gopath/src/github.com/k8snetworkplumbingwg/ovs-cni/pkg/plugin/plugin_test.go:670:5: don't use underscores in Go names; var ofport_request should be ofportRequest
@phoracek lint error is fixed - Sorry, too much Python lately and not enough Go 🤦
Haha, no worries!
@courtland would you please rebase the PR, so we could merge it?
@phoracek squashed and rebased against latest main
/retest
@phoracek I'm having trouble understanding whether or not the test failures are something bad with my rebase, or if they are related to errors in the recent port mirroring changes, as they seem specific to creating mirror ports. Any hints?
It seems like a transient error, not related to this PR.
/retest
/override pull-e2e-ovs-cni
It failed on an unrelated port mirroring test
/retest
Sorry about the trouble, I'm working on stabilization of the test in another PR.
/retest
/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: courtland, phoracek
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Thanks @courtland !
No worries, thanks for merging it!
What this PR does / why we need it:
Enables plugin configuration to request a specific
ofport
number when attaching a container to the host's OVS bridge.This PR adds a new
ofport_request
integer field to the network configuration options.Also addresses the old issue #73.
If the
ofport_request
field is omitted, the plugin continues to let OVS choose an available port. If the requestedofport
is already in use, OVS will automatically choose another freeofport
. See manovs-vswitchd.conf.db(5)
for more information aboutofport_request
behavior.Special notes for your reviewer:
I am using this as a CNI plugin in conjunction with HashiCorp Nomad and an OpenFlow SDN controller, although I imagine there are use cases for k8s as well. The fixed
ofport
is required to play nicely with the SDN controller. Containers are bridged into an OVS bridge datapath handled by the OpenFlow controller.Although I tried to mirror the behavior with the existing
OvnPortName
option, I am not able to pass along/modifyCNI_ARGS
through Nomad, which is somewhat related to https://github.com/hashicorp/nomad/issues/13520. This is why I opted to include it in the network configuration along with the vlan/mtu/bridge/etc.Release note: