From c591338253bf426286ae4eaf370411424c4e5bac Mon Sep 17 00:00:00 2001 From: swapnil-seagate <86768616+swapnil-seagate@users.noreply.github.com> Date: Mon, 5 Sep 2022 20:25:51 +0530 Subject: [PATCH] CORTX-34154: motr logs are not in compressed format (#2129) Problem: Support bundle was not collecting the motr logs correctly. Earlier the logs were collected in tar format. The issue was caused due to EOS-24059 Solution: Modified the m0reportbug script to correctly print the size of disk usage of the specified directory Signed-off-by: Swapnil Chaudhary --- utils/m0reportbug | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/m0reportbug b/utils/m0reportbug index d5cb6fb2b1b..05b042c046a 100755 --- a/utils/m0reportbug +++ b/utils/m0reportbug @@ -157,10 +157,12 @@ main() { done # Helps in debugging, If m0reportbug fails due to huge size - echo "du -sh $LIVE_CORE_DIR" >&2 - du_output=`du -sh "$LIVE_CORE_DIR" 2>&1` - echo "$du_output" >&2 - echo "The size of $LIVE_CORE_DIR is : $du_size" + if [ -d "$LIVE_CORE_DIR" ]; then + echo "du -sh $LIVE_CORE_DIR" >&2 + du_output=`du -sh "$LIVE_CORE_DIR" 2>&1` + du_size=`echo $du_output | awk '{print $1}'` + echo "The size of $LIVE_CORE_DIR is : $du_size" + fi # Create directory and put only latest files created into it. TEMP_WORKSPACE="$LIVE_CORE_DIR/tmpspace/"