CherryPicked: [cnv-4.22] net, evpn: add source provider migration test#5206
Conversation
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
NOTE: no need to merge before GA, can be merged after. |
|
/verified automatic cherry-pick, code is clean |
|
@servolkov for this PR to be merged during code freeze, an exceptino request is required |
missed your comment |
|
/rebase |
##### What this PR does / why we need it:
Add source provider migration test for EVPN.
- Add VNI-aware teardown for L2 endpoints: clean up VLAN/VNI bridge
mappings,
allowing re-deployment with different parameters in the same test
session.
- Add `macAddress` field to `Interface` dataclass for explicit MAC
assignment.
- Add explicit MAC support to `deploy_evpn_l2_endpoint`.
- Add `test_source_provider_migration`: emulates migration of an
external L2
workload into the cluster as a CUDN VM, preserving its IP and MAC
addresses.
The old endpoint is torn down, a VM takes over the original identity,
then a
new L2 endpoint is deployed with different IPs to verify connectivity.
##### Which issue(s) this PR fixes:
##### Special notes for reviewer:
- `test_source_provider_migration` uses `@pytest.mark.order("last")`
because it
tears down the shared L2 endpoint, which would break other tests if run
earlier.
- IPv6 static IP fix: `random_ipv6_address()` generates addresses with a
random 7th hextet,
but OVN IPAM caps /64 allocation to 65536 addresses.
Replaced with a low-offset hardcoded address. Only affects IPs requested
via
`network.kubevirt.io/addresses`; external netns endpoints are
unaffected.
The known bug: https://redhat.atlassian.net/browse/OCPBUGS-86810
- The new L2 endpoint is created as a test step rather than a fixture.
This is a
known limitation — currently only one L2 endpoint can exist at a time. A
follow-up
will reorganise fixtures to separate VLAN lifecycle from endpoints,
enabling
independent concurrent endpoints.
##### jira-ticket: https://redhat.atlassian.net/browse/CNV-89431
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* VM interfaces can include an explicit MAC address; L2 endpoints accept
and apply a provided MAC.
* **Tests**
* EVPN connectivity tests now perform a full source-provider migration
end-to-end and run last.
* IPv4/IPv6 endpoint addressing is deterministic for repeatable runs.
* Tests inject endpoint MACs into VM templates and add a fixture to
provision VMs attached to external L2 endpoints.
* **Bug Fixes**
* L2 endpoint teardown now fully cleans bridge/VNI state.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Sergei Volkov <sevolkov@redhat.com>
|
Successfully rebased |
de2c6f0 to
16eee47
Compare
|
Clean rebase detected — no code changes compared to previous head ( |
|
/security-override |
|
Security checks overridden by @rnetser. Security check runs set to pass. |
|
/retest tox |
|
/rebase |
|
Successfully rebased |
|
/approve |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:cnv-4.22 published |
Cherry-pick from
mainbranch, original PR: #4817, PR owner: servolkov