Skip to content

test: add SSH wait-for-ready retries to SOS artifact collection - #7375

Open
redhat-chai-bot wants to merge 1 commit into
openshift:release-4.22from
redhat-chai-bot:fix/sos-ssh-wait-for-ready
Open

redhat-chai-bot wants to merge 1 commit into
openshift:release-4.22from
redhat-chai-bot:fix/sos-ssh-wait-for-ready

Conversation

@redhat-chai-bot

Copy link
Copy Markdown
Contributor

Summary

Add an SSH connectivity wait at the top of sos_report_for_vm() before attempting to copy diagnostic artifacts (SOS reports, journal logs, anaconda logs) from the VM.

Problem

In scenarios where the VM reboots (e.g. low-latency/RT kernel configuration via greenboot), SSH may be temporarily unavailable when sos_report_for_vm() runs. The existing code does single-shot scp/ssh attempts and silently discards the diagnostic artifacts on failure, making post-mortem debugging harder.

Example failure:

ssh: connect to host <vm-ip> port 22: Connection refused
scp: Connection closed
WARNING: Ignoring an error when copying journal

Fix

  • Poll SSH connectivity at the start of sos_report_for_vm() with a 120-second timeout (10s connect timeout per attempt, 5s backoff)
  • If SSH comes back within the window, proceed with artifact collection as before
  • If SSH never comes back, log a WARNING and return cleanly — no pipeline blocking
  • Uses the same SSH options as the existing wait_for_ssh() helper, plus the VM's configured SSH port

This is a minimal, focused change — only test/bin/scenario.sh is modified.


AI-generated. Review for accuracy.

@pmtk requested via Chai Bot

Warning

Content scanning did not attest this change.
The scanner could not produce a verdict for the pushed content (never_attempted), so it has not been checked for credentials or malware.
Content scanning currently fails open, so this did not hold the change request for review — please review the diff with that in mind.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: d86354db-55d3-4ef1-be58-0b05d55170d3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@openshift-ci

openshift-ci Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci
openshift-ci Bot requested review from jogeo and pacevedom September 14, 2026 10:41
@openshift-ci

openshift-ci Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: redhat-chai-bot
Once this PR has been reviewed and has the lgtm label, please assign jogeo for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

…lection

When a VM is rebooting (e.g. after a low-latency/RT kernel switch),
SSH may be temporarily unavailable, causing copy_file_from_vm calls
to fail silently and diagnostic artifacts (SOS reports, journal logs,
anaconda logs) to be lost.

Add an SSH connectivity wait loop at the top of sos_report_for_vm()
that polls SSH with a 10s connect timeout and 5s backoff for up to
120 seconds. This is shorter than the full VM_BOOT_TIMEOUT (1200s)
to avoid blocking the pipeline while still riding out quick reboots.
If SSH never comes back, a warning is logged and the function returns
cleanly without attempting the copy operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@redhat-chai-bot
redhat-chai-bot force-pushed the fix/sos-ssh-wait-for-ready branch from 4802137 to cab20c0 Compare September 14, 2026 10:46
@openshift-ci

openshift-ci Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant