antrea
antrea copied to clipboard
Rename VF name back to the original when Pod deleted
For #7128
/test-all
/test-all-features-conformance
/test-all
Hi @antoninbas @jianjuns why I am adding a temporary interface suffix '~~' is for multiple SR-IOV nics in a Pod. Here is an issue I observed when I did the PoC:
E.g. two VF named 'eth1', 'eth2' in a K8s Node, when the users used two annotations to get two SR-IOV VFs for a Pod, the VF 'eth2' might be selected as the first annotation NAD, and being renamed to an interface with a default interface name 'eth1' in the Pod, then later, when the VF 'eth1' is moved to the Pod, it will conflict with existing 'eth1' in the Pod.
This issue is also tracked as the issue 3 in #7128.
A similar case may also happen when the VFs names are like 'ens64', 'ens65' but users also specify the interfaces name as 'ens64', 'ens65' in the NAD annotation. Let me know if we want to document this or have some improvement in codes.
@luolanzone did you check the host-device plugin implementation? Looks like they solve a similar problem and that there were potentially issues with interface renaming: https://github.com/containernetworking/plugins/blob/d0d20a9e2203ba462e6d8251072ff54595b3b469/plugins/main/host-device/host-device.go#L245-L247
Hi @antoninbas I didn't go through the whole logic in host-device. Let me double check, we may use the same way to handle the rename issue. Thanks to point out.
Hi @antoninbas @jianjuns could you take a look again? Thanks.
@antoninbas I am checking how to add the e2e tests, will update the codes later when it's ready.
/test-sriov-secondary-network-e2e
Hi @jianjuns @antoninbas @tnqn , I have verified the codes in a SRIOV testbed with two VF devices assigned in the Pod. The manual verification passed, but I still need sometime to update the unit tests, could you help to review the feature codes first? Thanks!
cc @wenqiq
/test-sriov-secondary-network-e2e
/test-sriov-secondary-network-e2e
/test-sriov-secondary-network-e2e
Will do a rebase after https://github.com/antrea-io/antrea/pull/7199 is merged.
unit test failed due to a multicast case, @wenyingd is checking the bug.
/test-all
Re-base is done on top of https://github.com/antrea-io/antrea/pull/7199
/test-sriov-secondary-network-e2e
/test-sriov-secondary-network-e2e
/test-sriov-secondary-network-e2e
/test-all
Re-based and added e2e.
/test-sriov-secondary-network-e2e
/test-all
/test-sriov-secondary-network-e2e
/test-sriov-secondary-network-e2e
@antoninbas @tnqn would you take a look as well? Thanks.
Re-based and resolved conflicts.
/test-sriov-secondary-network-e2e /test-all
/test-sriov-secondary-network-e2e /test-all