Skip to content

Commit 7f74c82

Browse files
Merge pull request #176 from red-hat-storage/sync_ds--main
Syncing latest changes from main for odf-must-gather
2 parents 4051945 + 94dd986 commit 7f74c82

File tree

6 files changed

+31
-3
lines changed

6 files changed

+31
-3
lines changed

collection-scripts/gather

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pre-install.sh ${BASE_COLLECTION_PATH}
142142
# Process the options
143143
if [ "$odf" == true ]; then
144144
echo "Collect ODF logs..."
145-
gather_ceph_pod_logs &
145+
gather_ceph_pod_logs ${BASE_COLLECTION_PATH} &
146146
pids+=($!)
147147
gather_ceph_logs &
148148
pids+=($!)

collection-scripts/gather_ceph_logs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ for ns in $namespaces; do
1717
oc rsync -n "${ns}" "$(oc get pods -n "${ns}" --no-headers | grep "${node//./}-debug" | awk '{print $1}')":/host/var/lib/rook/"${ns}"/log "${CEPH_DAEMON_LOG_OUTPUT_DIR}"
1818
}
1919

20+
# Collecting csi and ceph daemon logs
21+
csi_log_collection() {
22+
dbglog "collecting csi and ceph daemon logs from node ${node}"
23+
# as per the correction we are keeping both /var/lib/rook & /var/log/ceph for ceph pods, as to not break anything
24+
oc rsync -n "${ns}" "$(oc get pods -n "${ns}" --no-headers | grep "${node//./}-debug" | awk '{print $1}')":/host/var/log/ceph/ "${CEPH_DAEMON_LOG_OUTPUT_DIR}"
25+
oc rsync -n "${ns}" "$(oc get pods -n "${ns}" --no-headers | grep "${node//./}-debug" | awk '{print $1}')":/host/var/lib/rook/"${ns}".rbd.csi.ceph.com/log "${CSI_LOG_OUTPUT_DIR}"
26+
oc rsync -n "${ns}" "$(oc get pods -n "${ns}" --no-headers | grep "${node//./}-debug" | awk '{print $1}')":/host/var/lib/rook/"${ns}".cephfs.csi.ceph.com/log "${CSI_LOG_OUTPUT_DIR}"
27+
oc rsync -n "${ns}" "$(oc get pods -n "${ns}" --no-headers | grep "${node//./}-debug" | awk '{print $1}')":/host/var/lib/rook/"${ns}".nfs.csi.ceph.com/log "${CSI_LOG_OUTPUT_DIR}"
28+
}
29+
2030
crash_core_collection() {
2131
dbglog "collecting crash core dump from node ${node}"
2232
oc rsync -n "${ns}" "$(oc get pods -n "${ns}" --no-headers | grep "${node//./}"-debug | awk '{print $1}')":/host/var/lib/rook/"${ns}"/crash/ "${CRASH_OUTPUT_DIR}"
@@ -45,15 +55,18 @@ CMDS
4555
dbglog "collecting crash, journal and volume logs from node ${node}"
4656
CRASH_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/crash_${node}
4757
CEPH_DAEMON_LOG_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/ceph_daemon_log_${node}
58+
CSI_LOG_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/csi_log_${node}
4859
JOURNAL_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/journal_${node}
4960
KERNEL_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/kernel_${node}
5061
COREDUMP_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/coredump_${node}
5162
mkdir -p "${CRASH_OUTPUT_DIR}"
5263
mkdir -p "${CEPH_DAEMON_LOG_OUTPUT_DIR}"
64+
mkdir -p "${CSI_LOG_OUTPUT_DIR}"
5365
mkdir -p "${JOURNAL_OUTPUT_DIR}"
5466
mkdir -p "${KERNEL_OUTPUT_DIR}"
5567
mkdir -p "${COREDUMP_OUTPUT_DIR}"
5668
ceph_daemon_log_collection &
69+
csi_log_collection &
5770
pids_log+=($!)
5871
crash_core_collection &
5972
pids_log+=($!)

collection-scripts/gather_clusterscoped_resources

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ commands_desc+=("pv")
4848
commands_desc+=("ob")
4949
commands_desc+=("sc")
5050
commands_desc+=("nodes")
51+
commands_desc+=("csidriver")
5152
commands_desc+=("clusterversion")
5253
commands_desc+=("infrastructures.config")
5354
commands_desc+=("clusterrole")

collection-scripts/gather_namespaced_resources

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,17 @@ if [ -n "$(oc get network-attachment-definitions --no-headers -A | awk '{print $
207207
{ oc get network-attachment-definitions -oyaml --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_yaml_net_attach_def_all_ns"
208208
{ oc describe network-attachment-definitions --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/desc_net_attach_def_all_ns"
209209
fi
210+
211+
dbglog "collecting dump of oc get encryptionkeyrotationjob all namespaces"
212+
if [ -n "$(oc get encryptionkeyrotationjob --no-headers -A | awk '{print $1}')" ]; then
213+
{ oc get encryptionkeyrotationjob --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_encryptionkeyrotationjob_all_ns"
214+
{ oc describe encryptionkeyrotationjob --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/desc_encryptionkeyrotationjob_all_ns"
215+
{ oc get encryptionkeyrotationjob -oyaml --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_yaml_encryptionkeyrotationjob_all_ns"
216+
fi
217+
218+
dbglog "collecting dump of oc get encryptionkeyrotationcronjob all namespaces"
219+
if [ -n "$(oc get encryptionkeyrotationcronjob --no-headers -A | awk '{print $1}')" ]; then
220+
{ oc get encryptionkeyrotationcronjob --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_encryptionkeyrotationcronjob_all_ns"
221+
{ oc describe encryptionkeyrotationcronjob --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/desc_encryptionkeyrotationcronjob_all_ns"
222+
{ oc get encryptionkeyrotationcronjob -oyaml --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_yaml_encryptionkeyrotationcronjob_all_ns"
223+
fi

collection-scripts/gather_noobaa_resources

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mkdir -p "${NOOBAA_COLLLECTION_PATH}/raw_output/}"
3333

3434
# Save the information of all Postgres DBs in the NooBaa DB pod
3535
dbglog "Collecting MCG database information..."
36-
oc rsh --namespace openshift-storage noobaa-db-pg-0 psql -d nbcore -c '\pset pager off' -c '\x on' -c '\list+' &>"${NOOBAA_COLLLECTION_PATH}"/raw_output/db_list.txt 2>&1
36+
oc rsh --namespace openshift-storage noobaa-db-pg-0 psql -d nbcore -c '\pset pager off' -c '\list+' -c '\dt+' &>"${NOOBAA_COLLLECTION_PATH}"/raw_output/db_list.txt 2>&1
3737

3838
# Run the Collection of Noobaa cli using must-gather
3939
# shellcheck disable=SC2086

collection-scripts/gather_odf_client

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,5 @@ done
108108

109109
# collect csidriver details
110110
{ oc get csidriver; } >"${BASE_COLLECTION_PATH}/csidriver/get_csidriver" 2>&1
111-
{ oc describe csidriver -o yaml; } >"${BASE_COLLECTION_PATH}/csidriver/desc_csidriver" 2>&1
111+
{ oc describe csidriver; } >"${BASE_COLLECTION_PATH}/csidriver/desc_csidriver" 2>&1
112112
{ oc get csidriver -o yaml; } >"${BASE_COLLECTION_PATH}/csidriver/csidriver.yaml" 2>&1

0 commit comments

Comments
 (0)