CherryPicked: [cnv-4.22] net: Filter IPv4 on IPv6-only clusters#5596
Conversation
On IPv6-only clusters, VMIs may still report IPv4 addresses due to a cloud-init [limitation](canonical/cloud-init#6685): - If DHCPv4 is disabled with no static IPv4 provided, DHCPv4 is still left enabled by cloud-init. - If DHCPv4 is disabled with a static IPv4 provided, DHCPv4 is kept disabled. This caused fixture predicates to wait indefinitely (count mismatch) and the IP visibility test to fail (extra IPv4 address in reported set). This change includes extracting a new cached helper for repeated fetching of cluster IP support and addition of a new helper to strip cluster-unsupported addresses. Apply it in the localnet fixture predicates and in `test_vmi_reports_ip_on_secondary_interface_without_vlan`. Filtering rather than blocking preserves test coverage on IPv6-only clusters. Blocking would skip the test entirely, losing the regression guard for CNV-38477. The cloud-init DHCPv4 behavior is a known infrastructure limitation, not a product bug - filtering the extra IPv4 addresses out is the correct response Targeted for backport to 4.22, the first release to support secondary networks on single-stack IPv6 clusters <!-- full-ticket-url needs to be provided. This would add a link to the pull request to the jira and close it when the pull request is merged If the task is not tracked by a Jira ticket, just write "NONE". --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **Bug Fixes** * Improved IP address validation to count and report only IPv4/IPv6 addresses supported by the cluster configuration. * Updated local network and bridge interface checks to ignore unsupported IP families when verifying VM interface IPs. * **Tests** * Adjusted test fixtures and upgrade scenario validations to use the unified cluster-supported IP-family logic. * Removed a disabled test marker and refined expected IP-mismatch reporting formatting. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Asia Khromov <azhivovk@redhat.com>
|
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
Branch Management
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
Security Checks
💡 Tips
📌 Additional InformationCustom Commands:
For more information, please refer to the project documentation or contact the maintainers. |
|
@azhivovk — AI automatically resolved merge conflicts for this cherry-pick. Please review the changes carefully and verify correctness before merging. |
|
/verified Single-stack IPv6 BM with cnv-4.22: Dual-stack BM with cnv-4.22: |
|
/approve |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:cnv-4.22 published |
Cherry-pick from
mainbranch, original PR: #5492, PR owner: azhivovk