From a89d545f2a5e0bc931612e248517148dfbd8fce6 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Thu, 30 Jun 2022 11:23:01 -0400 Subject: [PATCH] fix: replica set error from pymongo 3.10 -> 3.12 upgrade The pymongo dependency for edx-platform was updated (3.10.1 to 3.12.3) in https://github.com/openedx/edx-platform/pull/30569 This caused the following error when running the edx-platform database migration split_modulestore_django.0002_data_migration as part of `tutor dev quickstart`: pymongo.errors.ServerSelectionTimeoutError: client is configured to connect to a replica set named '' but this node belongs to a set named 'None', Timeout: 30s, Topology Description: ]> This commit explicitly sets replicaSet to None to indicate that it's a standalone MongoDB instance. I also had to remove the CONTENTSTORE entry from auth.yml because edx-platform's devstack.py assumes it has a non-null value (set in common.py), and devstack.py executes before tutor's development.py can set this replicaSet value. --- CHANGELOG-nightly.md | 1 + tutor/templates/apps/openedx/config/partials/auth.yml | 1 - tutor/templates/apps/openedx/settings/partials/common_all.py | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-nightly.md b/CHANGELOG-nightly.md index 6070b30a8f..092f962465 100644 --- a/CHANGELOG-nightly.md +++ b/CHANGELOG-nightly.md @@ -9,6 +9,7 @@ When backporting changes to master, we should keep only the entries that corresp facing changes. --> +- [Bugfix] Fix MongoDB replica set connection error resulting from edx-platform's pymongo (3.10.1 -> 3.12.3) upgrade ([edx-platform#30569](https://github.com/openedx/edx-platform/pull/30569)). (by @ormsbee) - [Improvement] For Tutor Nightly (and only Nightly), official plugins are now installed from their nightly branches on GitHub instead of a version range on PyPI. This will allow Nightly users to install all official plugins by running ``pip install -e ".[full]"``. - [Bugfix] Remove edX references from bulk emails ([issue](https://github.com/openedx/build-test-release-wg/issues/100)). - [Bugfix] Update ``celery`` invocations for lms-worker and cms-worker to be compatible with Celery 5 CLI. diff --git a/tutor/templates/apps/openedx/config/partials/auth.yml b/tutor/templates/apps/openedx/config/partials/auth.yml index 2ec6448707..3e72058013 100644 --- a/tutor/templates/apps/openedx/config/partials/auth.yml +++ b/tutor/templates/apps/openedx/config/partials/auth.yml @@ -1,7 +1,6 @@ SECRET_KEY: "{{ OPENEDX_SECRET_KEY }}" AWS_ACCESS_KEY_ID: "{{ OPENEDX_AWS_ACCESS_KEY }}" AWS_SECRET_ACCESS_KEY: "{{ OPENEDX_AWS_SECRET_ACCESS_KEY }}" -CONTENTSTORE: null DOC_STORE_CONFIG: null {{ patch("openedx-auth") }} XQUEUE_INTERFACE: diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index d6a92914e7..8a74c88ea6 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -16,6 +16,7 @@ "password": None, {% endif %} "db": "{{ MONGODB_DATABASE }}", + "replicaSet": None, } DOC_STORE_CONFIG = mongodb_parameters CONTENTSTORE = {