Skip to content

CherryPicked: [cnv-4.22] net: Filter IPv4 on IPv6-only clusters#5596

Merged
rnetser merged 1 commit into
cnv-4.22from
CherryPicked-fix-ipv4-fetch-3kX2G
Jul 13, 2026
Merged

CherryPicked: [cnv-4.22] net: Filter IPv4 on IPv6-only clusters#5596
rnetser merged 1 commit into
cnv-4.22from
CherryPicked-fix-ipv4-fetch-3kX2G

Conversation

@cnv-tests-github-webhook-dollierp

Copy link
Copy Markdown

Cherry-pick from main branch, original PR: #5492, PR owner: azhivovk

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>
@openshift-virtualization-qe-bot-2

Copy link
Copy Markdown
Contributor

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message
  • /security-override - Set security check runs to pass (maintainers only)
  • /security-override cancel - Re-run security checks

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3
  • /cherry-pick-retry <branch> - Retry a failed cherry-pick (merged PRs only)

Branch Management

  • /rebase - Rebase this PR branch onto its base branch

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  5. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • EdDev
  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • Anatw
  • EdDev
  • RoniKishner
  • azhivovk
  • dshchedr
  • frenzyfriday
  • nirdothan
  • orelmisan
  • rnetser
  • servolkov
  • vsibirsk
  • yossisegev
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6-1m)
Security Checks
  • Suspicious Path Detection: Monitors paths: .claude/, .vscode/, .cursor/, .devcontainer/, .pi/, .github/workflows/, .github/actions/
  • Committer Identity Check: Verifies last committer matches PR author
  • Mandatory: Security checks block merge (use /security-override to bypass — maintainers only)

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

📌 Additional Information

Custom Commands:

  • /test-plan — Triggers CodeRabbit to analyze the PR's changed files and post a test execution plan
  • /rerun-smoke — Adds retest-smoke label on the PR to trigger smoke tests execution

For more information, please refer to the project documentation or contact the maintainers.

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

⚠️ This cherry-pick had conflicts resolved by AI (claude/claude-opus-4-6-1m)

@azhivovk — AI automatically resolved merge conflicts for this cherry-pick. Please review the changes carefully and verify correctness before merging.

@yossisegev yossisegev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Asia

@azhivovk

Copy link
Copy Markdown
Contributor

/verified

Single-stack IPv6 BM with cnv-4.22:
uv run pytest --verbose -rs -s -o log_cli=true --leftovers-collector --tb=native --skip-deprecated-api-test --cluster-sanity-skip-storage-check tests/network/localnet/ -m "ipv6 and not ipv4"
Result: 6 passed, 15 deselected, 42 warnings in 605.46s (0:10:05)

Dual-stack BM with cnv-4.22:
uv run pytest --verbose --jira -rs -s -o log_cli=true --leftovers-collector --tb=native --skip-deprecated-api-test --cluster-sanity-skip-storage-check -m cnv_upgrade --upgrade cnv --cnv-version 4.22.3 --cnv-image 4.22.3 tests/network/upgrade/test_upgrade_network.py -p no:pytest_dependency tests/network/localnet/
Result: 10 passed, 21 deselected, 2 warnings, 4 subtests passed in 617.20s (0:10:17)

@rnetser

rnetser commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

/approve

@rnetser
rnetser merged commit 8c6c342 into cnv-4.22 Jul 13, 2026
26 checks passed
@rnetser
rnetser deleted the CherryPicked-fix-ipv4-fetch-3kX2G branch July 13, 2026 14:22
@openshift-virtualization-qe-bot-2

Copy link
Copy Markdown
Contributor

New container for quay.io/openshift-cnv/openshift-virtualization-tests:cnv-4.22 published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants