Skip to content

Commit

Permalink
fix: replica set error from pymongo 3.10 -> 3.12 upgrade
Browse files Browse the repository at this point in the history
The pymongo dependency for edx-platform was updated (3.10.1 to 3.12.3)
in openedx/edx-platform#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: <TopologyDescription id:
  62bdbaf182687350acf1aeec, topology_type: Single, servers:
  [<ServerDescription ('mongodb', 27017) server_type: Unknown, rtt:
   None, error=ConfigurationError("client is configured to connect to a
   replica set named '' but this node belongs to a set named 'None'")>]>

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.
  • Loading branch information
David Ormsbee committed Jun 30, 2022
1 parent ede972a commit 64c03cf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Every user-facing change should have an entry in this changelog. Please respect
-->

## Unreleased
- [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] Make it possible to override k8s resources in plugins using `k8s-override` patch. (by @foadlind)

## v14.0.2 (2022-06-27)
Expand Down
1 change: 0 additions & 1 deletion tutor/templates/apps/openedx/config/partials/auth.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"password": None,
{% endif %}
"db": "{{ MONGODB_DATABASE }}",
"replicaSet": None,
}
DOC_STORE_CONFIG = mongodb_parameters
CONTENTSTORE = {
Expand Down

0 comments on commit 64c03cf

Please sign in to comment.