Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.15] NO-JIRA: Add ARO support to must-gather client #415

Open
wants to merge 1 commit into
base: release-4.15
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions collection-scripts/gather
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,8 @@ oc adm inspect --dest-dir must-gather --rotated-pod-logs "${all_ns_resources[@]}
# Gather Performance profile information
/usr/bin/gather_ppc

# Gather ARO information
/usr/bin/gather_aro

# force disk flush to ensure that all data gathered is accessible in the copy container
sync
22 changes: 22 additions & 0 deletions collection-scripts/gather_aro
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
BASE_COLLECTION_PATH="must-gather"
ARO_CR_NAME="clusters.aro.openshift.io"

IS_ARO=$(oc get ${ARO_CR_NAME} --ignore-not-found=true )
if [ -z "$IS_ARO" ]; then
exit 0
fi

function gather_aro() {
echo "INFO: Collecting ARO Cluster Data"
declare -a INSPECT_TARGETS=(${ARO_CR_NAME} "ns/openshift-azure-operator" "ns/openshift-azure-logging")

for TARGET in "${INSPECT_TARGETS[@]}"; do
oc adm inspect --dest-dir "${BASE_COLLECTION_PATH}" "${TARGET}"
done
}

gather_aro

# force disk flush to ensure that all data gathered are written
sync