diff --git a/collection-scripts/gather b/collection-scripts/gather index afb0e1b..e069369 100755 --- a/collection-scripts/gather +++ b/collection-scripts/gather @@ -142,7 +142,7 @@ pre-install.sh ${BASE_COLLECTION_PATH} # Process the options if [ "$odf" == true ]; then echo "Collect ODF logs..." - gather_ceph_pod_logs & + gather_ceph_pod_logs ${BASE_COLLECTION_PATH} & pids+=($!) gather_ceph_logs & pids+=($!) diff --git a/collection-scripts/gather_ceph_logs b/collection-scripts/gather_ceph_logs index 320112a..815cf18 100755 --- a/collection-scripts/gather_ceph_logs +++ b/collection-scripts/gather_ceph_logs @@ -17,6 +17,16 @@ for ns in $namespaces; do 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}" } + # Collecting csi and ceph daemon logs + csi_log_collection() { + dbglog "collecting csi and ceph daemon logs from node ${node}" + # as per the correction we are keeping both /var/lib/rook & /var/log/ceph for ceph pods, as to not break anything + 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}" + 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}" + 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}" + 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}" + } + crash_core_collection() { dbglog "collecting crash core dump from node ${node}" 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 dbglog "collecting crash, journal and volume logs from node ${node}" CRASH_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/crash_${node} CEPH_DAEMON_LOG_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/ceph_daemon_log_${node} + CSI_LOG_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/csi_log_${node} JOURNAL_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/journal_${node} KERNEL_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/kernel_${node} COREDUMP_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/coredump_${node} mkdir -p "${CRASH_OUTPUT_DIR}" mkdir -p "${CEPH_DAEMON_LOG_OUTPUT_DIR}" + mkdir -p "${CSI_LOG_OUTPUT_DIR}" mkdir -p "${JOURNAL_OUTPUT_DIR}" mkdir -p "${KERNEL_OUTPUT_DIR}" mkdir -p "${COREDUMP_OUTPUT_DIR}" ceph_daemon_log_collection & + csi_log_collection & pids_log+=($!) crash_core_collection & pids_log+=($!) diff --git a/collection-scripts/gather_clusterscoped_resources b/collection-scripts/gather_clusterscoped_resources index 3434465..2d8e67b 100755 --- a/collection-scripts/gather_clusterscoped_resources +++ b/collection-scripts/gather_clusterscoped_resources @@ -48,6 +48,7 @@ commands_desc+=("pv") commands_desc+=("ob") commands_desc+=("sc") commands_desc+=("nodes") +commands_desc+=("csidriver") commands_desc+=("clusterversion") commands_desc+=("infrastructures.config") commands_desc+=("clusterrole") diff --git a/collection-scripts/gather_namespaced_resources b/collection-scripts/gather_namespaced_resources index df2dbc8..c58198c 100755 --- a/collection-scripts/gather_namespaced_resources +++ b/collection-scripts/gather_namespaced_resources @@ -207,3 +207,17 @@ if [ -n "$(oc get network-attachment-definitions --no-headers -A | awk '{print $ { oc get network-attachment-definitions -oyaml --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_yaml_net_attach_def_all_ns" { oc describe network-attachment-definitions --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/desc_net_attach_def_all_ns" fi + +dbglog "collecting dump of oc get encryptionkeyrotationjob all namespaces" +if [ -n "$(oc get encryptionkeyrotationjob --no-headers -A | awk '{print $1}')" ]; then + { oc get encryptionkeyrotationjob --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_encryptionkeyrotationjob_all_ns" + { oc describe encryptionkeyrotationjob --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/desc_encryptionkeyrotationjob_all_ns" + { oc get encryptionkeyrotationjob -oyaml --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_yaml_encryptionkeyrotationjob_all_ns" +fi + +dbglog "collecting dump of oc get encryptionkeyrotationcronjob all namespaces" +if [ -n "$(oc get encryptionkeyrotationcronjob --no-headers -A | awk '{print $1}')" ]; then + { oc get encryptionkeyrotationcronjob --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_encryptionkeyrotationcronjob_all_ns" + { oc describe encryptionkeyrotationcronjob --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/desc_encryptionkeyrotationcronjob_all_ns" + { oc get encryptionkeyrotationcronjob -oyaml --all-namespaces; } >>"${BASE_COLLECTION_PATH}/namespaces/all/get_yaml_encryptionkeyrotationcronjob_all_ns" +fi diff --git a/collection-scripts/gather_noobaa_resources b/collection-scripts/gather_noobaa_resources index dbcb576..98a3511 100755 --- a/collection-scripts/gather_noobaa_resources +++ b/collection-scripts/gather_noobaa_resources @@ -33,7 +33,7 @@ mkdir -p "${NOOBAA_COLLLECTION_PATH}/raw_output/}" # Save the information of all Postgres DBs in the NooBaa DB pod dbglog "Collecting MCG database information..." -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 +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 # Run the Collection of Noobaa cli using must-gather # shellcheck disable=SC2086 diff --git a/collection-scripts/gather_odf_client b/collection-scripts/gather_odf_client index 17321a2..616f6c9 100755 --- a/collection-scripts/gather_odf_client +++ b/collection-scripts/gather_odf_client @@ -108,5 +108,5 @@ done # collect csidriver details { oc get csidriver; } >"${BASE_COLLECTION_PATH}/csidriver/get_csidriver" 2>&1 -{ oc describe csidriver -o yaml; } >"${BASE_COLLECTION_PATH}/csidriver/desc_csidriver" 2>&1 +{ oc describe csidriver; } >"${BASE_COLLECTION_PATH}/csidriver/desc_csidriver" 2>&1 { oc get csidriver -o yaml; } >"${BASE_COLLECTION_PATH}/csidriver/csidriver.yaml" 2>&1