Skip to content

Commit 38d0354

Browse files
committed
agent: Download and archive installation logs in gather.sh
Integrate the --download-logs mode into the artifact collection process. When running in ISO_NO_REGISTRY boot mode, gather.sh now: - Invokes the UI installer with --download-logs flag - Includes the downloaded installation-logs.tar in the screenshot archive if available The log download is best-effort and uses || true to ensure gather.sh continues successfully even if the download fails (e.g., if the UI is not accessible or logs are not yet available). Installation logs are now collected alongside screenshots in the agent-gather-console-screenshots.tar.xz archive, providing a complete set of console artifacts for debugging. Assisted-by: Claude Code
1 parent 4e0aa17 commit 38d0354

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

agent/gather.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ if [[ "$num_screenshots" -gt 0 ]]; then
2828
archive_name="agent-gather-console-screenshots.tar.xz"
2929
echo "Gathering screenshots to $archive_name"
3030

31+
# Attempt to download installation logs from the UI
32+
if [[ "${AGENT_E2E_TEST_BOOT_MODE}" == "ISO_NO_REGISTRY" ]]; then
33+
echo "Attempting to download installation logs from Assisted Installer UI"
34+
rendezvousIP=$(getRendezvousIP)
35+
ocp_dir_abs_path="$(realpath "${OCP_DIR}")"
36+
37+
pushd agent/isobuilder/ui_driven_cluster_installation
38+
RENDEZVOUS_IP=$rendezvousIP OCP_DIR=$ocp_dir_abs_path go run main.go --download-logs || true
39+
popd
40+
fi
41+
3142
# Build list of files to archive
3243
files_to_archive=()
3344

@@ -39,6 +50,11 @@ if [[ "$num_screenshots" -gt 0 ]]; then
3950
files_to_archive+=("${OCP_DIR}"/*.png)
4051
fi
4152

53+
# Include installation logs if available
54+
if [[ -f "${OCP_DIR}/installation-logs.tar" ]]; then
55+
files_to_archive+=("${OCP_DIR}/installation-logs.tar")
56+
fi
57+
4258
# Create archive with all collected files
4359
tar -cJf $archive_name "${files_to_archive[@]}"
4460
else

0 commit comments

Comments
 (0)