Skip to content

[Virt] Add SSH retry to run_ssh_commands calls - #5989

Open
SamAlber wants to merge 1 commit into
RedHatQE:mainfrom
SamAlber:virt-add-ssh-retry-to-run-ssh-commands
Open

[Virt] Add SSH retry to run_ssh_commands calls#5989
SamAlber wants to merge 1 commit into
RedHatQE:mainfrom
SamAlber:virt-add-ssh-retry-to-run-ssh-commands

Conversation

@SamAlber

@SamAlber SamAlber commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Transient virtctl port-forward SSH flakes ("Error reading SSH protocol banner") cause false test failures when run_ssh_commands is called without retry.

Without it, a single drop = hard failure. In recent gating, 5 other tests hit this same SSH error and passed (had retry), while test_vm_with_sidecar_hook failed (no retry).

Add wait_timeout=TIMEOUT_2MIN to all bare calls in tests/virt/ so they survive transient SSH drops.

This follows the same approach the storage team used in PR #4471.

Calls intentionally left without retry:

test_windows_crash_detection (triggers BSOD, expects SSH drop)
longevity reboot_vm (expects connection reset)

What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket:

Transient virtctl port-forward SSH flakes ("Error reading SSH
protocol banner") cause false test failures when run_ssh_commands
is called without retry.

Add wait_timeout=TIMEOUT_2MIN to all bare calls in tests/virt/
so they survive transient SSH drops.

This follows the same approach the storage team used in PR RedHatQE#4471

Calls intentionally left without retry:
- test_windows_crash_detection (triggers BSOD, expects SSH drop)
- longevity reboot_vm (expects connection reset)

Signed-off-by: Samuel Albershtein <salbersh@redhat.com>
Assisted-by: Claude <noreply@anthropic.com>
@openshift-virtualization-qe-bot

Copy link
Copy Markdown

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 (PR author or approvers)
  • /hold cancel - Unblock PR merging (PR author or approvers)
  • /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:

  • dshchedr
  • vsibirsk

Reviewers:

  • SamAlber
  • akri3i
  • dshchedr
  • vsibirsk
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-5

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (3594a24).

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@SamAlber, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6e154c40-f673-4209-b6f5-6b5c1fbdae7a

📥 Commits

Reviewing files that changed from the base of the PR and between 0c7b7fd and 5eb815b.

📒 Files selected for processing (18)
  • tests/virt/cluster/common_templates/rhel/test_rhel_tablet_device.py
  • tests/virt/cluster/common_templates/utils.py
  • tests/virt/cluster/common_templates/windows/test_windows_custom_options.py
  • tests/virt/cluster/common_templates/windows/test_windows_tablet_device.py
  • tests/virt/cluster/longevity_tests/utils.py
  • tests/virt/cluster/sysprep/test_sysprep.py
  • tests/virt/cluster/vm_cloning/test_vm_cloning.py
  • tests/virt/cluster/vm_cloning/utils.py
  • tests/virt/cluster/vm_lifecycle/test_vm_data_persistency.py
  • tests/virt/node/general/test_oom.py
  • tests/virt/node/general/test_vm_with_sidecar.py
  • tests/virt/node/general/test_vmi_reset.py
  • tests/virt/node/general/test_windows_vtpm_bitlocker.py
  • tests/virt/node/general/test_wsl2.py
  • tests/virt/node/gpu/utils.py
  • tests/virt/node/migration_and_maintenance/test_vm_disk_load_with_migration.py
  • tests/virt/node/rng/test_rng.py
  • tests/virt/utils.py
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 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

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

@dshchedr

Copy link
Copy Markdown
Collaborator

/lgtm
/approve

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.

5 participants