Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed mongo7 and 2412 upgrade scripts #5837

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions bin/upgrade/24.12/upgrade.mongo.70.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions bin/upgrade/24.12/upgrade_db.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VER="24.10"
VER="24.12"

CONTINUE="$(countly check before upgrade db "$VER")"

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions bin/upgrade/24.12/upgrade_fs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Running filesystem modifications"

VER="24.10"
VER="24.12"

CONTINUE="$(countly check before upgrade fs "$VER")"

Expand All @@ -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"
Expand Down
Loading