Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/bin/scenario.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,16 @@ sos_report() {
sos_report_for_vm() {
local -r vmdir="${1}"
local -r vmname="${2}"

# Wait for SSH to become available before attempting artifact collection.
# The VM may be rebooting (e.g. after a low-latency/RT kernel switch),
# causing SSH connection refused errors and silent loss of diagnostics.
local -r vm_ip=$(get_vm_property "${vmname}" ip)
wait_for_ssh "${vm_ip}" || {
echo "WARNING: SSH not available, skipping SOS collection for ${vmname}"
return
}

# Some scenarios do not start with MicroShift installed, so we
# can't rely on the wrapper being there or working if it
# is. Copy the script to the host, just in case, along with a
Expand Down