From 569497dc2e982e80e94c9ee892c0b9ef4914243e Mon Sep 17 00:00:00 2001 From: ihaardik Date: Wed, 4 Dec 2024 15:52:55 +0530 Subject: [PATCH 1/2] fixed mongo7 and 2412 upgrade scripts --- bin/upgrade/24.12/upgrade.mongo.70.sh | 9 +++++++++ bin/upgrade/24.12/upgrade_db.sh | 2 +- bin/upgrade/24.12/upgrade_fs.sh | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bin/upgrade/24.12/upgrade.mongo.70.sh b/bin/upgrade/24.12/upgrade.mongo.70.sh index 0374efbc243..5b836e084b2 100644 --- a/bin/upgrade/24.12/upgrade.mongo.70.sh +++ b/bin/upgrade/24.12/upgrade.mongo.70.sh @@ -117,6 +117,15 @@ if [ -f /etc/redhat-release ]; then systemctl daemon-reload fi +# check and comment out journal: enabled: true in mongod.conf +CONF_FILE="/etc/mongod.conf" +if grep -qP '^\s*journal\s*:\s*$' "$CONF_FILE" && grep -qP '^\s*enabled\s*:\s*true\s*$' "$CONF_FILE"; then + echo "Commenting out journal: enabled: true in $CONF_FILE" + sed -i '/^\s*journal\s*:/ { N; s/\(.*\n\s*\)\(enabled\s*:\s*true\s*$\)/# \1# \2/ }' "$CONF_FILE" +else + echo "Could not find 'journal: enabled: true' in $CONF_FILE or it's already commented." +fi + #mongodb might need to be started systemctl restart mongod || echo "mongodb systemctl job does not exist" diff --git a/bin/upgrade/24.12/upgrade_db.sh b/bin/upgrade/24.12/upgrade_db.sh index 0f8d7895442..ef4d8fde8b4 100644 --- a/bin/upgrade/24.12/upgrade_db.sh +++ b/bin/upgrade/24.12/upgrade_db.sh @@ -1,6 +1,6 @@ #!/bin/bash -VER="24.10" +VER="24.12" CONTINUE="$(countly check before upgrade db "$VER")" diff --git a/bin/upgrade/24.12/upgrade_fs.sh b/bin/upgrade/24.12/upgrade_fs.sh index ae88d5fd2c2..924e41ba0cd 100644 --- a/bin/upgrade/24.12/upgrade_fs.sh +++ b/bin/upgrade/24.12/upgrade_fs.sh @@ -2,7 +2,7 @@ echo "Running filesystem modifications" -VER="24.10" +VER="24.12" CONTINUE="$(countly check before upgrade fs "$VER")" @@ -23,8 +23,8 @@ then #enable command line bash "$DIR/scripts/detect.init.sh" - countly plugin enable journey_engine; countly plugin enable content; + countly plugin enable journey_engine; #upgrade plugins nodejs "$DIR/scripts/install_plugins.js" From 50e935e2dac7711f59c5e80e9360923328311801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Art=C5=ABrs=20Kadi=C4=B7is?= Date: Wed, 4 Dec 2024 13:17:33 +0200 Subject: [PATCH 2/2] Update upgrade_db.sh --- bin/upgrade/24.12/upgrade_db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/upgrade/24.12/upgrade_db.sh b/bin/upgrade/24.12/upgrade_db.sh index ef4d8fde8b4..adca324e7ce 100644 --- a/bin/upgrade/24.12/upgrade_db.sh +++ b/bin/upgrade/24.12/upgrade_db.sh @@ -22,8 +22,8 @@ then if [ "$1" != "combined" ]; then #upgrade plugins - countly plugin enable journey_engine; countly plugin enable content; + countly plugin enable journey_engine; nodejs "$DIR/scripts/install_plugins.js" fi