m0reportbug: updated path of core directory
Added one more path to $CORE_DIR (/var/log/crash) since on provisioned
setup core will be into /var/log/crash and on non-provisioned/VM setup
cores might be in /var/crash.
@@ -41,7 +41,7 @@ CRASH_AGE_MAX=3 # maximal age (days) of vmcore-dmesg.txt files to be collected
STAGE_TIME_LIMIT=10 # seconds; if a stage runs longer, show its duration
DEFAULT_INPUT_DIRS_GLOB='/var/motr*'
IN_DIR=
-CORE_DIR=/var/crash # path from where m0reportbug will collect cores
+CORE_DIRS=("/var/crash/" "/var/log/crash/") # path from where m0reportbug will collect cores
RECOVERY_SCRIPT_DIR=/opt/seagate/cortx/motr/libexec # dir containing recovery traces and scripts
RECOVERY_LOG_DIR=/var/log/seagate/motr/datarecovery # dir containing recovery log/logs
LIVE_CORE_DIR=/var/log/seagate/motr
@@ -120,14 +120,19 @@ main() {
done
done >>$REPORT
- # Collects live/compressed core generated in /var/crash
- IN_DIR=${CORE_DIR}
+ # Collects compressed core generated in /var/crash and /var/log/crash
+ for IN_DIR in ${CORE_DIRS[@]}; do
+ [[ -d $IN_DIR ]] || {
+ warn "$IN_DIR: no such directory"
+ continue
+ }
local label="backtraces_core $IN_DIR"
echo -n "$label... " >&2
section "[$label]" >>$REPORT
local t=$(date +%s)
backtraces_cores >>$REPORT
echo "OK$(_time $t)" >&2
+ done
# Collects live/compressed core generated in /var/crash
IN_DIR=${LIVE_CORE_DIR}
@@ -827,6 +832,9 @@ exit
###
### Date Version Description
### ---------- ------- ----------------------------------------------------
+### 2020-10-02 0.51 Added /var/log/crash to CORE_DIRS list since on
+### provisioner deployed setup, core would be in /var/log/crash
+###
### 2020-09-21 0.50 updated m0reportbug to capture below recovery debug data
### 1.m0betool and m0beck binaries.
### 2.motr_data_recovery.sh and prov-m0-reset scripts
