From 4b78bd6ae1820b36d77319e3d8012b3871799fc0 Mon Sep 17 00:00:00 2001 From: feichashao Date: Thu, 26 Sep 2024 14:46:59 +0800 Subject: [PATCH] OSD-25772 fix permission issue and add note for debug handler --- scripts/CEE/hs-must-gather/README.md | 6 +++++- scripts/CEE/hs-must-gather/script.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/CEE/hs-must-gather/README.md b/scripts/CEE/hs-must-gather/README.md index 09dbf475..e4758d87 100644 --- a/scripts/CEE/hs-must-gather/README.md +++ b/scripts/CEE/hs-must-gather/README.md @@ -11,8 +11,12 @@ The script will upload the compressed dump to the [SFTP](https://access.redhat.c Parameters: - CLUSTER_ID: hosted cluster id. +- DUMP_GUEST_CLUSTER(true|false): also dump the must gather in the guest cluster. In the management cluster: ```bash -ocm backplane managedjob create CEE/hs-must-gather -p CLUSTER_ID=my-hs-cluster-id +ocm backplane managedjob create CEE/hs-must-gather -p CLUSTER_ID=my-hs-cluster-id -p DUMP_GUEST_CLUSTER=false ``` + +Note: +The debug handler is disabled in the production environment. Logs can not be collected by hypershift dump, and DUMP_GUEST_CLUSTER won't work in the production environment. Please use `osdctl cluster dt gather-logs` to collect logs in the production environment. diff --git a/scripts/CEE/hs-must-gather/script.sh b/scripts/CEE/hs-must-gather/script.sh index 5ac8407a..f12e93f7 100755 --- a/scripts/CEE/hs-must-gather/script.sh +++ b/scripts/CEE/hs-must-gather/script.sh @@ -9,7 +9,7 @@ source /managed-scripts/lib/sftp_upload/lib.sh # Define expected values HS_BINARY_PATH="/usr/local/bin/hypershift" -DUMP_DIR="${PWD}/${CLUSTER_ID}" +DUMP_DIR="/tmp/${CLUSTER_ID}" TODAY=$(date -u +%Y%m%d) TARBALL_NAME="${TODAY}_${CLUSTER_ID}_dump.tar.gz" TARBALL_PATH="${DUMP_DIR}/${TARBALL_NAME}"