Skip to content

Commit

Permalink
Fix sos report failure for offline hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
ggiguash committed Oct 28, 2023
1 parent 78b8def commit 1a96e6d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/bin/scenario.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ sos_report() {
continue
fi
ip=$(cat "${vmdir}/ip")
if [ -z "${ip}" ] ; then
# skip hosts without NICs
# FIXME: use virsh to copy sos report files
continue
fi
# Copy the sos helper for compatibility, it is only available in 4.14 RPMs
scp "${ROOTDIR}/scripts/microshift-sos-report.sh" "redhat@${ip}":/tmp
ssh "redhat@${ip}" \
Expand Down Expand Up @@ -375,6 +380,10 @@ launch_vm() {
return 1
fi
else
# Record no-IP for offline VMs to signal special sos report collection technique
mkdir -p "${SCENARIO_INFO_DIR}/${SCENARIO}/vms/${vmname}"
touch "${SCENARIO_INFO_DIR}/${SCENARIO}/vms/${vmname}/ip"

echo "VM ${full_vmname} has no NICs, skipping IP assignment and ssh polling"
record_junit "${vmname}" "ip-assignment" "SKIPPED"
record_junit "${vmname}" "ssh-access" "SKIPPED"
Expand Down

0 comments on commit 1a96e6d

Please sign in to comment.