Skip to content

net: STD for dual-stream RHCOS 9/10 node migration network tests#4569

Open
azhivovk wants to merge 1 commit intoRedHatQE:mainfrom
azhivovk:std_hetro
Open

net: STD for dual-stream RHCOS 9/10 node migration network tests#4569
azhivovk wants to merge 1 commit intoRedHatQE:mainfrom
azhivovk:std_hetro

Conversation

@azhivovk
Copy link
Copy Markdown
Contributor

@azhivovk azhivovk commented Apr 23, 2026

STD for network connectivity tests on clusters with mixed RHCOS 9 and RHCOS 10 worker nodes.

Tests cover four network types (Linux bridge, localnet, primary UDN, primary network) verifying connectivity is preserved during live migration of the server VM.
Server VM migration is considered the more impactful scenario as it tests connectivity preservation from the endpoint holding the listening socket.
Both migration directions are covered within other existing tests.

Each network type has its own module with shared setup (NNCP, NAD) in the module-level preconditions.

jira-ticket: https://redhat.atlassian.net/browse/CNV-81981

Summary by CodeRabbit

  • Tests
    • Added regression test scenarios for network connectivity preservation across live migration between RHCOS 9 and RHCOS 10 worker nodes, covering primary network, secondary network, local network, and user-defined network interfaces.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Four new pytest modules are added to define connectivity regression test skeletons for live migration scenarios between RHCOS 9 and RHCOS 10 worker nodes across four network types (L2 bridge, localnet, primary network, and User Defined Network). Each module contains two Polarion-marked test functions with descriptive docstrings but no executable test logic.

Changes

Network Connectivity Regression Test Skeletons

Layer / File(s) Summary
Test Framework Setup
tests/network/l2_bridge/rhel9_rhel10_cluster/test_connectivity.py, tests/network/localnet/rhel9_rhel10_cluster/test_connectivity.py, tests/network/primary_network/rhel9_rhel10_cluster/test_connectivity.py, tests/network/user_defined_network/rhel9_rhel10_cluster/test_connectivity.py
Module docstrings describe migration connectivity scenarios; __test__ = False disables pytest collection; pytest is imported.
Test Declarations
tests/network/l2_bridge/rhel9_rhel10_cluster/test_connectivity.py, tests/network/localnet/rhel9_rhel10_cluster/test_connectivity.py, tests/network/primary_network/rhel9_rhel10_cluster/test_connectivity.py, tests/network/user_defined_network/rhel9_rhel10_cluster/test_connectivity.py
Two test functions per module (test_*_migration_to_rhcos10() and test_*_migration_to_rhcos9()) decorated with unique Polarion markers (CNV-15949, CNV-15950, CNV-15952, etc.). Test bodies contain only docstrings describing preconditions, migration steps, and expected TCP connectivity preservation; no assertions or executable logic is present.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Reasoning: Four nearly identical modules with high pattern repetition. Review involves verifying Polarion marker IDs are distinct and correct, confirming docstrings accurately describe each network type's migration scenario, checking __test__ = False is intentional (to prevent running incomplete stubs), and ensuring consistency of module structure across the four files. No complex logic, control flow, or data shape changes to reason about.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically identifies the main change: adding system test definitions (STD) for network tests covering RHCOS 9/10 dual-stream node migration scenarios.
Description check ✅ Passed The description is well-structured and comprehensive, covering the purpose (network connectivity tests for mixed RHCOS versions), scope (four network types), test approach (server VM migration emphasis), and includes the required Jira ticket reference.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@azhivovk azhivovk changed the title net: Add STD for heterogeneous RHCOS 9/10 node migration network tests net: STD for dua-stream RHCOS 9/10 node migration network tests Apr 23, 2026
@azhivovk azhivovk changed the title net: STD for dua-stream RHCOS 9/10 node migration network tests net: STD for dual-stream RHCOS 9/10 node migration network tests Apr 23, 2026
@openshift-virtualization-qe-bot-3
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

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

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

Reviewers:

  • Anatw
  • EdDev
  • azhivovk
  • frenzyfriday
  • nirdothan
  • orelmisan
  • servolkov
  • yossisegev
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6[1m])

💡 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

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@tests/network/l2_bridge/mixed_nodes/test_primary_network_connectivity_mixed_nodes.py`:
- Around line 19-45: The Polarion marker value is duplicated (CNV-0) in the test
function
test_connectivity_over_primary_network_preserved_during_source_migration (and
across other mixed_nodes test modules), causing ambiguous test attribution;
update the pytest.mark.polarion decorator on this function to a unique
placeholder ID (e.g., CNV-0A) and ensure the other mixed_nodes modules
(functions with the same decorator such as in
test_l2_bridge_connectivity_mixed_nodes.py,
test_localnet_connectivity_mixed_nodes.py, test_udn_connectivity_mixed_nodes.py)
each get distinct placeholders (CNV-0B/C/D) or their final real Polarion IDs so
each test function has a unique polarion marker.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 695c7508-c3b6-4e04-aa6d-4fd9fd030b7e

📥 Commits

Reviewing files that changed from the base of the PR and between 0feeb8f and abcfaaa.

📒 Files selected for processing (7)
  • tests/network/l2_bridge/mixed_nodes/__init__.py
  • tests/network/l2_bridge/mixed_nodes/test_l2_bridge_connectivity_mixed_nodes.py
  • tests/network/l2_bridge/mixed_nodes/test_primary_network_connectivity_mixed_nodes.py
  • tests/network/localnet/mixed_nodes/__init__.py
  • tests/network/localnet/mixed_nodes/test_localnet_connectivity_mixed_nodes.py
  • tests/network/user_defined_network/mixed_nodes/__init__.py
  • tests/network/user_defined_network/mixed_nodes/test_udn_connectivity_mixed_nodes.py

@openshift-virtualization-qe-bot
Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/27150

@azhivovk
Copy link
Copy Markdown
Contributor Author

Change: remove client migration scenarios

coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 28, 2026
@azhivovk
Copy link
Copy Markdown
Contributor Author

Change: Add polarion IDs

coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 28, 2026
Comment thread tests/network/l2_bridge/mixed_nodes/test_connectivity.py Outdated
Comment thread tests/network/primary_network/mixed_nodes/test_connectivity.py Outdated
Comment thread tests/network/l2_bridge/mixed_nodes/test_connectivity.py Outdated
Comment thread tests/network/l2_bridge/mixed_nodes/test_l2_bridge_connectivity_mixed_nodes.py Outdated
Comment thread tests/network/l2_bridge/mixed_nodes/test_l2_bridge_connectivity_mixed_nodes.py Outdated
@azhivovk
Copy link
Copy Markdown
Contributor Author

azhivovk commented Apr 29, 2026

Change:

  • Replace special_infra marker with new dual_stream
  • Update STP link
  • Shorten steps
  • Rename tests

@azhivovk
Copy link
Copy Markdown
Contributor Author

Change: rename tests without mentioning node OS

coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 30, 2026
@azhivovk
Copy link
Copy Markdown
Contributor Author

Change: apply bot's suggestion - primary interface test

@azhivovk
Copy link
Copy Markdown
Contributor Author

Change: rename modules

coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 30, 2026
Copy link
Copy Markdown
Contributor

@nirdothan nirdothan left a comment

Choose a reason for hiding this comment

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

IMHO it would have been beneficial to indicate that migration between OSs would be accomplished using node selectors targeting the os label, as is not exactly a standard procedure.
I guess it can be inferred from the preconditions "... VM connected to a Linux bridge network, running on an RHCOS 9 worker node via node selector".
Thus if anyone asks why the implementation did not use an anti-affinity rule you can reference the decision to here.

@azhivovk
Copy link
Copy Markdown
Contributor Author

azhivovk commented Apr 30, 2026

/verified
No tests are collected
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/l2_bridge/mixed_nodes tests/network/localnet/mixed_nodes/ tests/network/primary_network/mixed_nodes/ tests/network/user_defined_network/mixed_nodes/
Result: 1 deselected in 14.25s (deprecated-api-test)

@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

@coderabbitai

Test execution plan request details

CRITICAL: You MUST post an inline review comment on the first changed line of the first file.
The inline comment should contain the Test Execution Plan with the smoke tests recommendation.
Do NOT submit a formal review - just post the inline comment directly.

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
If you fail to run or post a comment, retry.

Analysis Requirements:

  1. Examine code changes in each modified file
  2. Identify affected code paths, functions, and classes
  3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes
  4. Trace test dependencies through imports, shared utilities, and fixture inheritance
  5. Detect new tests introduced in the PR
  6. Smoke Test Impact Analysis: Determine if any changes could affect smoke tests by checking:
    • Changes to files/functions used by tests marked with @pytest.mark.smoke
    • Changes to fixtures or utilities imported by smoke tests
    • Changes to conftest.py files that may affect smoke test execution
    • Changes to core infrastructure code (utilities/, libs/) that smoke tests depend on

Your deliverable:
Your change request comment will be based on the following requirements:

Test Execution Plan

  • Run smoke tests: True / False (Based on your smoke test impact analysis - True if any changes may affect smoke tests)
  • path/to/test_file.py - When the entire test file needs verification
  • path/to/test_file.py::TestClass::test_method - When specific test(s) needed
  • path/to/test_file.py::test_function - When specific test(s) needed
  • -m marker - When specific marker(s) can be used to cover multiple cases.

Guidelines:

  • Include only tests directly affected by the changes
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name if only specific tests are needed
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal

Hardware-Related Checks (SR-IOV, GPU, DPDK):

When PR modifies fixtures for hardware-specific resources:

  • Collection Safety: Fixtures MUST have existence checks (return None when hardware unavailable)
  • Test Plan: MUST verify both WITH and WITHOUT hardware:
    • Run affected tests on cluster WITH hardware
    • Verify collection succeeds on cluster WITHOUT hardware

CRITICAL WORKFLOW COMPLETION RULES:

When responding to this test execution plan request, you MUST follow these rules EXACTLY:

  1. YOUR ONLY DELIVERABLE: Post an inline review comment containing the test execution plan on the first changed line
  2. THEN STOP IMMEDIATELY - Do NOT generate any additional response
  3. FALLBACK ONLY: If submitting the review fails after retrying, post as a regular PR comment
  4. SILENCE = SUCCESS: After successfully submitting the review, your task is complete. No confirmation needed.

ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):

  • ❌ Do NOT post acknowledgment messages like "Test execution plan posted", "Review posted successfully", "I've successfully posted"
  • ❌ Do NOT mention review IDs, URLs, or confirmation of posting in the PR thread
  • ❌ Do NOT add any follow-up comments after submitting the review
  • ❌ Do NOT reply to confirm task completion
  • ❌ Do NOT explain what you did - just do it and stop

Remember: The pull request review is visible to users. Additional comments are redundant noise.

CRITICAL: Before setting "Run smoke tests: True", you MUST use shell scripts to:
- Trace the actual fixture dependency chain from smoke tests to changed fixtures
- Verify that smoke tests actually import/use changed utilities or functions
- Confirm the dependency path exists; do NOT assume based on scope or semantics
- Be conservative: Session-scoped fixtures or infrastructure-sounding names do NOT
automatically mean smoke test impact. Only flag smoke test impact when you can
demonstrate a concrete dependency path.
WRONG: "This session-scoped storage fixture might affect smoke tests"
RIGHT: "Smoke test X uses fixture Y, which depends on the changed fixture Z"

Comment thread tests/network/l2_bridge/mixed_nodes/test_connectivity.py Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get PR info - files changed, commit SHA for inline comment
gh pr view 4569 --repo RedHatQE/openshift-virtualization-tests --json files,headRefOid,commits | jq '{headRefOid, files: [.files[].path], commits: [.commits[-1]]}'

Length of output: 1785


🏁 Script executed:

#!/bin/bash
# Check if smoke tests depend on any of the new files or imports used
rg "pytest.mark.smoke" --type=py -l | head -20

Length of output: 517


🏁 Script executed:

#!/bin/bash
# Get the diff to find position for inline comment on first file
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/4569/files | jq '[.[] | {filename, patch, sha}][0]'

Length of output: 138


🏁 Script executed:

#!/bin/bash
# Get all files with patches to find the first one with actual content
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/4569/files | jq '[.[] | select(.patch != null) | {filename, patch_first_line: (.patch | split("\n")[1])}][0]'

Length of output: 110


🏁 Script executed:

#!/bin/bash
gh api \
  --method POST \
  repos/RedHatQE/openshift-virtualization-tests/pulls/4569/reviews \
  --field commit_id="793fc86b0544a212d2b3379789e1e18cab6cc874" \
  --field event="COMMENT" \
  --field body="" \
  --field "comments[][path]=tests/network/l2_bridge/mixed_nodes/test_connectivity.py" \
  --field "comments[][position]=1" \
  --field "comments[][body]=**Test Execution Plan**

- **Run smoke tests: False** _(No dependency path from smoke tests to the new STD-only files)_

All new files set \`__test__ = False\` — pytest will not collect them. No test execution is required for this STD PR."

Length of output: 1735



🧠 Learnings used
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-16T10:28:54.212Z
Learning: In the openshift-virtualization-tests repository, when determining smoke test impact for test execution plans, only set "Run smoke tests: True" if there is a verified, traceable dependency path from smoke tests to the changed code. Session-scoped fixtures or infrastructure-sounding changes do NOT automatically imply smoke test impact - the dependency chain must be explicitly verified using shell scripts before recommending smoke test execution.

Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-04-30T13:42:43.892Z
Learning: In the openshift-virtualization-tests repository, when processing test execution plan requests for PRs that introduce NEW test classes or test files (not just modifications to existing tests), always verify STD-first workflow compliance as part of the analysis: (1) check if the new test class has actual implementation code (assertions, test logic) — if so, it needs a prior STD PR, (2) check if the test file has a module docstring with STP or Jira/RFE link, (3) check if `What this PR does / why we need it:` in the PR description has meaningful content. Flag any violation even when the bot's primary request is only for a test execution plan. These checks should be appended to the test execution plan inline comment.

Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-22T15:56:00.157Z
Learning: In the openshift-virtualization-tests repository, when responding to test execution plan requests from openshift-virtualization-qe-bot-3, do NOT use "REQUEST_CHANGES" review type if the PR author has already marked the PR as verified (e.g., with `/verified` command). Test execution plans are informational guides, not blocking requirements. Use COMMENT event for informational test plans, or only REQUEST_CHANGES if there are actual code issues that need to be addressed before merging.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-16T14:00:59.076Z
Learning: In the openshift-virtualization-tests repository, when responding to test execution plan requests from openshift-virtualization-qe-bot-3, CodeRabbit must post ONLY an inline review comment on the Files Changed tab and then stop immediately without generating any follow-up comments in the PR discussion thread. No acknowledgment messages, no confirmation of posting, no explanation - silence after posting the inline review equals success. Additional comments create empty/meaningless reviews that clutter the PR.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3062
File: conftest.py:333-333
Timestamp: 2025-12-16T20:11:03.645Z
Learning: In the openshift-virtualization-tests repository, when determining smoke test impact for changes affecting py_config["os_login_param"], follow this verification methodology: (1) Find all smoke tests: `rg "pytest.mark.smoke" --type=py -B2 | grep "def test_"`, (2) For each smoke test file, search for VM creation patterns: `rg "VirtualMachineForTests|running_vm|VirtualMachineForTestsFromTemplate|wait_for_ssh|check_ssh_connectivity"`, (3) Trace the dependency chain: smoke test → VirtualMachineForTests/running_vm() → wait_for_ssh_connectivity() (default enabled) → vm.login_params property → py_config["os_login_param"][vm.os_flavor], (4) Check utilities/virt.py for login_params usage: `rg "os_login_param|login_params" utilities/virt.py -C3`. Any smoke test creating VMs with default SSH connectivity checks (running_vm with check_ssh_connectivity=True) depends on os_login_param, even if the test doesn't directly reference it.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3062
File: conftest.py:333-333
Timestamp: 2025-12-16T15:09:49.597Z
Learning: In the openshift-virtualization-tests repository, when conftest.py or utilities/bitwarden.py changes affect py_config["os_login_param"], smoke test impact must be determined by: (1) finding all smoke tests using `rg "pytest.mark.smoke"`, (2) checking each for VM creation patterns (VirtualMachineForTests, running_vm, VirtualMachineForTestsFromTemplate), (3) tracing whether running_vm is called with default check_ssh_connectivity=True, which accesses vm.login_params property that reads py_config["os_login_param"][vm.os_flavor]. The dependency chain is: smoke test → VM creation → running_vm → wait_for_ssh_connectivity → vm.login_params → os_login_param. Any smoke test creating VMs with SSH connectivity (the default) depends on os_login_param.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-09-29T19:05:24.987Z
Learning: The test execution plan for PR `#1904` focuses on cluster-type conditional logic where nmstate functionality is bypassed on cloud clusters (Azure/AWS) but fully functional on bare-metal/PSI clusters, requiring different test strategies for each environment type.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4328
File: tests/network/flat_overlay/test_multi_network_policy.py:32-32
Timestamp: 2026-04-14T16:15:36.741Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when reviewing any PR with "Quarantine" in the title or a `quarantine` label, always verify compliance with docs/QUARANTINE_GUIDELINES.md:
- Category 1 (Product Bug): must use `pytest.mark.jira("CNV-XXXXX", run=False)` — the `pytest_jira` plugin conditionally skips the test when the Jira issue is open. Do NOT suggest replacing this with `xfail`.
- Category 2 (Automation Issue): must use `pytest.mark.xfail(run=False, reason=...)` — pytest itself handles the skip.
Flag any quarantine PR that uses the wrong category marker, is missing a Jira ticket reference, or uses `run=False` in the wrong context. Raising these compliance questions is always appropriate for quarantine PRs, even if the final resolution confirms the marker is correct.

Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4578
File: tests/network/localnet/nad_ref_change/test_nad_ref_change.py:18-18
Timestamp: 2026-04-26T11:44:22.059Z
Learning: In RedHatQE/openshift-virtualization-tests, STD (Standard Test Definition) PRs intentionally use placeholder Polarion IDs (e.g., `pytest.mark.polarion("CNV-00000")`) while test scenarios are still being agreed upon. Real Polarion IDs are filled in before or during the implementation PR. Do not flag placeholder Polarion IDs as a blocking issue in STD PRs that set `__test__ = False`.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3358
File: tests/network/sriov/test_sriov.py:21-21
Timestamp: 2026-01-07T09:52:22.771Z
Learning: For PRs that only remove or modify pytest markers (like removing pytest.mark.post_upgrade) without changing test logic in openshift-virtualization-tests, collection verification using `pytest --collect-only` is sufficient. Full test execution is not required to verify marker-only changes.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-16T14:06:22.391Z
Learning: In the openshift-virtualization-tests repository, when posting test execution plan inline review comments using GitHub API, the full test execution plan content must go in the `comments[].body` field (which appears on Files Changed tab), NOT in the top-level `body` field (which appears in PR discussion thread). The top-level `body` field should be omitted or left empty to avoid posting redundant comments in the PR discussion thread.

Learnt from: CR
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-27T15:43:46.511Z
Learning: Applies to tests/**/*.py : New feature tests MUST follow STD-first workflow: STP review, then STD review, then implementation. NEVER submit test implementation without prior STD review

Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:13.674Z
Learning: In RedHatQE/openshift-virtualization-tests, maintainer dshchedr prefers CodeRabbit to post targeted inline comments on the Files Changed tab at each applicable location rather than aggregating multiple issues into a single PR discussion thread reply.

Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:13.674Z
Learning: In RedHatQE/openshift-virtualization-tests, maintainer dshchedr prefers CodeRabbit to post targeted inline comments on the Files changed tab for each applicable location rather than aggregating multiple issues into a single discussion thread.

Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 1776
File: libs/net/node_network.py:25-31
Timestamp: 2025-08-20T23:43:28.117Z
Learning: In the RedHatQE/openshift-virtualization-tests project, servolkov's team always uses bare metal (BM) clusters with IPv4 setup in their testing environment, making defensive checks for IPv4 data presence potentially redundant in their networking code.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3371
File: scripts/tests_analyzer/compare_coderabbit_decisions.py:199-289
Timestamp: 2026-01-13T10:06:14.822Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers to keep pagination loops inline rather than extracting them into generic helper functions when the loops have different URL patterns and unique post-processing logic, as the inline approach improves readability and makes each endpoint's behavior more explicit.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3228
File: .coderabbit.yaml:30-41
Timestamp: 2026-01-05T10:33:55.037Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers minimal pre-merge checks in CodeRabbit configuration: only docstrings enforcement (80% threshold) is needed, not title or description checks.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 2469
File: utilities/sanity.py:139-142
Timestamp: 2025-11-08T07:36:57.616Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers to keep refactoring PRs (like PR `#2469`) strictly focused on moving/organizing code into more granular modules without adding new functionality, error handling, or behavioral changes. Such improvements should be handled in separate PRs.

Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 1160
File: tests/storage/storage_migration/test_mtc_storage_class_migration.py:165-176
Timestamp: 2025-06-17T07:45:37.776Z
Learning: In the openshift-virtualization-tests repository, user jpeimer prefers explicit fixture parameters over composite fixtures in test methods, even when there are many parameters, as they find this approach more readable and maintainable for understanding test dependencies.

Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 3571
File: tests/storage/storage_migration/utils.py:158-167
Timestamp: 2026-01-25T13:18:26.819Z
Learning: In the openshift-virtualization-tests repository, user jpeimer prefers to avoid nitpicky style changes (e.g., removing `.keys()` from dict membership checks) because verifying every change is expensive. Be cautious about suggesting low-impact stylistic improvements that require verification overhead.

Learnt from: akri3i
Repo: RedHatQE/openshift-virtualization-tests PR: 1210
File: tests/virt/cluster/general/mass_machine_type_transition_tests/conftest.py:24-64
Timestamp: 2025-06-23T19:28:20.281Z
Learning: In OpenShift Virtualization mass machine type transition tests, the machine type glob pattern "pc-q35-rhel8.*.*" is intentionally hard-coded in the kubevirt_api_lifecycle_automation_job as it's used only once for this specific test case, with plans to update it in the future if the job needs to support other machine types.

Learnt from: RoniKishner
Repo: RedHatQE/openshift-virtualization-tests PR: 1411
File: utilities/os_utils.py:246-279
Timestamp: 2025-07-22T17:13:59.166Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, CentOS preferences follow the format "centos-stream<version>" (e.g., "centos-stream9", "centos-stream10"). The generate_instance_type_centos_os_matrix function correctly uses regex to extract numeric versions and constructs the latest version string in the same format as the input preferences for proper comparison.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-09-29T19:05:24.987Z
Learning: For PR `#1904` test execution, the critical validation point is test_connectivity_over_migration_between_localnet_vms which should fail gracefully on cloud clusters but pass on bare-metal/PSI clusters, representing the core nmstate conditional logic functionality.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 4527
File: tests/network/multi_arch/test_network_multi_arch.py:6-13
Timestamp: 2026-04-23T15:47:17.573Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, multi-architecture network tests (under tests/network/multi_arch/) are designated tier-2 per the STP (CNV-78200). Since tier2 is implicit (added automatically to tests without an exclusion marker), no explicit tier marker should be added to the pytestmark list for these tests. Do not suggest adding tier3 for multi-arch network tests in this repository.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3873
File: tests/network/localnet/test_non_udn_localnet.py:7-9
Timestamp: 2026-02-25T10:52:23.378Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, networking infrastructure requirements such as nmstate, localnet bridge mappings, and NIC availability are NOT considered special/platform-specific infrastructure that would warrant a tier3 marker. These are standard test environment capabilities in this repository's test environment, and tests requiring them do not automatically qualify as tier3 unless they involve other truly platform-specific/complex/time-consuming characteristics beyond standard network test infrastructure.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3873
File: tests/network/localnet/test_non_udn_localnet.py:7-9
Timestamp: 2026-02-25T10:52:23.378Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, networking infrastructure requirements such as nmstate, localnet bridge mappings, and NIC availability are NOT considered special/platform-specific infrastructure that would warrant a tier3 marker. These are standard test environment capabilities, and tests requiring them do not automatically qualify as tier3 unless they involve bare-metal requirements or other truly platform-specific/complex/time-consuming characteristics.

Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4318
File: tests/network/bandwidth/test_bandwidth.py:1-3
Timestamp: 2026-03-31T08:35:26.070Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, the requirement to include an STP link in the module docstring applies only to STD tests for new features. Tests that are support exceptions (linked to SUPPORTEX-* tickets, e.g., SUPPORTEX-29574) do NOT have an associated STP and therefore do NOT require an STP link in the module docstring. Do not flag missing STP links for support exception test files.

Copy link
Copy Markdown
Contributor

@EdDev EdDev left a comment

Choose a reason for hiding this comment

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

I commented only on the first test, but it relates to all the others.

between RHCOS 9 and RHCOS 10 nodes.

Preconditions:
- Linux bridge Network Attachment Definition created
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.

Why is this a direct precondition for the test? Do you intend to use it to perform a step or check some expectation?
If it is an indirect requirement, that should be a dependency of the VMs (and therefore, not specified here).

Another indirect dependency is the NNCP, through which the bridge itself isconfigure.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed, thanks



@pytest.mark.polarion("CNV-15949")
def test_connectivity_preserved_during_server_migration():
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.

I do not understand if it is the primary or secondary checked here.
Please add details about the binding used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was asked not to mention the setup twice if we can understand it from the package name.

Binding is implied by the test package - l2_bridge, and in primary network tests - primary_network.
If I add Linux bridge/primary, the name becomes too long #4569 (comment)

I edited it but I get conflicting reviews regarding the name.

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.

it lives under l2_bridge, how it can be primary?


Steps:
1. Live migrate the server VM to the RHCOS 10 node
2. Live migrate the server VM back to the RHCOS 9 node
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.

It looks to me like two different tests. Why these two steps are considered in the same test?
It would have made sense to me if the scenario (from a user perspective) would also fit. I mean, one scenario per test is fine. But I do not think it is the case.

Copy link
Copy Markdown
Contributor Author

@azhivovk azhivovk May 3, 2026

Choose a reason for hiding this comment

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

We do the migration trip rhcos9 -> 10 -> 9 in one test
Do you want me to split it to 2 tests: rchos9 (created) -> rhcos10 (migrated), rhcos10 (created)-> rhcos9 (migrated)?
I thought we can reuse the migrated vm to rhcos10 as if it was created on it and then we migrate to rhcos9 on the same test

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.

  1. I think a test should represent a user scenario. IMO a migration trip is not a user scenario.
  2. You should use the same VM and this is what has been done so far in other features as well. Please review the stuntime and/or the IP specification cases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

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.

"mixed nodes" does not sound expressive enough to me. It sounds like node slad to me :)

Maybe rhel9_rhel10_cluster.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

STD for network connectivity tests on clusters with
mixed RHCOS 9 and RHCOS 10 worker nodes.

Tests cover four network types (Linux bridge, localnet,
primary UDN, primary network) verifying connectivity is
preserved during live migration of the server VM.
Server VM migration is considered the more impactful scenario
as it tests connectivity preservation from the endpoint holding
the listening socket.
Both migration directions are covered within other
existing tests.

Each network type has its own module with shared setup
(NNCP, NAD) in the module-level preconditions.

Signed-off-by: Asia Khromov <azhivovk@redhat.com>
Assisted-by: Claude Sonnet 4.6
@azhivovk
Copy link
Copy Markdown
Contributor Author

azhivovk commented May 3, 2026

Change:

  • Rename package mixed_nodes -> rhel9_rhel10_cluster
  • Split migration to 1 node per test
  • Add secondary\primary to test name

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@tests/network/user_defined_network/rhel9_rhel10_cluster/test_connectivity.py`:
- Around line 17-51: Rename the two test functions that collide with
primary-network tests to include UDN context: change
test_primary_connectivity_preserved_after_server_migration_to_rhcos10 and
test_primary_connectivity_preserved_after_server_migration_to_rhcos9 to unique
names such as
test_udn_primary_connectivity_preserved_after_server_migration_to_rhcos10 and
test_udn_primary_connectivity_preserved_after_server_migration_to_rhcos9 (or
similar including "udn" or "user_defined_network") in this file so pytest -k
filtering and reports no longer collide with the primary-network variants;
update any local references or markers (e.g., the `@pytest.mark.polarion`
decorators) accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e65123af-e2bb-41b9-a9e7-3df92d1abe20

📥 Commits

Reviewing files that changed from the base of the PR and between e4021af and 5b7f7c5.

📒 Files selected for processing (9)
  • tests/network/l2_bridge/rhel9_rhel10_cluster/__init__.py
  • tests/network/l2_bridge/rhel9_rhel10_cluster/test_connectivity.py
  • tests/network/localnet/rhel9_rhel10_cluster/__init__.py
  • tests/network/localnet/rhel9_rhel10_cluster/test_connectivity.py
  • tests/network/primary_network/__init__.py
  • tests/network/primary_network/rhel9_rhel10_cluster/__init__.py
  • tests/network/primary_network/rhel9_rhel10_cluster/test_connectivity.py
  • tests/network/user_defined_network/rhel9_rhel10_cluster/__init__.py
  • tests/network/user_defined_network/rhel9_rhel10_cluster/test_connectivity.py

Comment thread tests/network/l2_bridge/rhel9_rhel10_cluster/test_connectivity.py
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