ovn-org / ovn-kubernetes

A robust Kubernetes networking platform
https://ovn-kubernetes.io/
Apache License 2.0
767 stars 333 forks source link

UDN: Generate LSP pod network configuration with a synthetic network selection element #4473

Open qinqon opened 2 days ago

qinqon commented 2 days ago

What this PR does and why is it needed

Add logic at secondary network controller to trigger the creation of network selection element (but not annotate the pod) with the found active network, it also plumbs the primary network at the pod network namespace

It also introduce "Pending" egress test to activate it when topology for egress is in place.

TODO:

How to verify it

It contains some unit test and the already present east/west traffic e2e

Details to documentation updates

NONE

Does this PR introduce a user-facing change?

NONE

-->

Wired up primary network lsp and network namespace config by creating a network selection element.
coveralls commented 1 day ago

Coverage Status

coverage: 52.654% (-0.08%) from 52.731% when pulling 37811d45704590870e5372787b18b2bf33d4ba37 on qinqon:user-defined-network-primary-lsp into aec9e5a893d16ce7fb0a1d8791e0915cd560e2f4 on ovn-org:master.

qinqon commented 21 hours ago

Locally sometimes I get

9s          Warning   FailedCreatePodSandBox   pod/server-pod   Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "ff1353cd44444f783e1424284479d4bcbde611118c1e7bcbf6e356ea5bde39d0": plugin type="multus" name="multus-cni-network" failed (add): [network-segmentation-3679/server-pod/7064d963-c59c-4842-b167-445e30c88f09:ovn-kubernetes]: error adding container to network "ovn-kubernetes": CNI request failed with status 400: '[network-segmentation-3679/server-pod ff1353cd44444f783e1424284479d4bcbde611118c1e7bcbf6e356ea5bde39d0 network default NAD default] [network-segmentation-3679/server-pod ff1353cd44444f783e1424284479d4bcbde611118c1e7bcbf6e356ea5bde39d0 network default NAD default] failed to configure pod interface: failed to add gateway route to link: invalid argument...