Skip to content

Commit 962d77d

Browse files
authored
DOCS-15066 refactor Convert Replica Set to Replicated Shard Cluster (#479) (#581)
* refactor Convert Replica Set to Replicated Shard Cluster * review feedback * removes Downtime sub-heading * review feedback * fixes typo * updates warning * let users know they may need to restart apps connected to secondaries * updates primary warning * clarifies primary warning and moves to the primary stepdown section
1 parent 00a9d73 commit 962d77d

File tree

3 files changed

+47
-17
lines changed

3 files changed

+47
-17
lines changed

source/includes/fact-3.4-shardsvr-required.rst renamed to source/includes/fact-shardsvr-required.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
For MongoDB 3.4 sharded clusters, :binary:`~bin.mongod` instances for
1+
For sharded clusters, :binary:`~bin.mongod` instances for
22
the shards **must** explicitly specify its role as a ``shardsvr``,
33
either via the configuration file setting
44
:setting:`sharding.clusterRole` or via the command line option

source/includes/steps-convert-replica-set-shard-aware.yaml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,21 @@ title: Restart secondary members with the ``--shardsvr`` option.
99
level: 4
1010
ref: restart-secondary
1111
pre: |
12-
One secondary at a time, restart each :ref:`secondary
13-
<replica-set-secondary-members>` with the :option:`--shardsvr <mongod --shardsvr>`
14-
option. To continue to use the same port, include the :option:`--port <mongod --port>`
12+
One secondary at a time, :ref:`shut down <terminate-mongod-processes>`
13+
and restart each :ref:`secondary <replica-set-secondary-members>`
14+
with the :option:`--shardsvr <mongod --shardsvr>` option.
15+
16+
.. warning::
17+
18+
This step requires some downtime for applications connected to
19+
secondary members of the replica set. Applications connected to a
20+
secondary may error with ``CannotVerifyAndSignLogicalTime`` after
21+
restarting the secondary until you perform the steps in
22+
:ref:`convert-add-initial-shard`. Restarting your application will
23+
also stop it from receiving ``CannotVerifyAndSignLogicalTime``
24+
errors.
25+
26+
To continue to use the same port, include the :option:`--port <mongod --port>`
1527
option. Include additional options, such as :option:`--bind_ip <mongod --bind_ip>`, as
1628
appropriate for your deployment.
1729
@@ -30,6 +42,14 @@ level: 4
3042
ref: step-down-primary
3143
pre: |
3244
Connect :binary:`~bin.mongosh` to the primary and stepdown the primary.
45+
46+
.. warning::
47+
48+
This step requires some downtime. Applications may error with
49+
``CannotVerifyAndSignLogicalTime`` after stepping down the primary
50+
until you perform the steps in :ref:`convert-add-initial-shard`.
51+
Restarting your application will also stop it from receiving
52+
``CannotVerifyAndSignLogicalTime`` errors.
3353
action:
3454
language: javascript
3555
code: |
@@ -39,7 +59,8 @@ title: Restart the primary with the ``--shardsvr`` option.
3959
level: 4
4060
ref: restart-primary
4161
pre: |
42-
Restart the primary with the :option:`--shardsvr <mongod --shardsvr>` option.
62+
:ref:`Shut down <terminate-mongod-processes>` the primary and restart with the :option:`--shardsvr <mongod --shardsvr>` option.
63+
4364
To continue to use the same port, include the :option:`--port <mongod --port>` option.
4465
action:
4566
language: javascript

source/tutorial/convert-replica-set-to-replicated-shard-cluster.txt

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ The procedure is as follows:
3535

3636
#. Shard the desired collection. See :ref:`convert-shard-collection`.
3737

38+
39+
Considerations
40+
--------------
41+
42+
43+
Individual steps in these procedures note when downtime will occur.
44+
45+
.. important::
46+
47+
These procedures cause some downtime for your deployment.
48+
49+
3850
Prerequisites
3951
-------------
4052

@@ -69,15 +81,6 @@ The replica set members are on the following hosts:
6981
For more information on deploying a replica set, see
7082
:doc:`/tutorial/deploy-replica-set`.
7183

72-
Restart the Replica Set as a Shard
73-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74-
75-
.. versionchanged:: 3.4
76-
77-
.. include:: /includes/fact-3.4-shardsvr-required.rst
78-
79-
.. include:: /includes/steps/convert-replica-set-shard-aware.rst
80-
8184
.. _convert-deploy-sharding-infrastructure:
8285

8386
Deploy Config Server Replica Set and ``mongos``
@@ -92,8 +95,16 @@ servers </core/sharded-cluster-config-servers>` and the
9295

9396
- The :binary:`~bin.mongos` uses ``mongodb6.example.net``.
9497

98+
9599
.. include:: /includes/steps/convert-replica-set-shard-deploy-infrastructure.rst
96100

101+
Restart the Replica Set as a Shard
102+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103+
104+
.. include:: /includes/fact-shardsvr-required.rst
105+
106+
.. include:: /includes/steps/convert-replica-set-shard-aware.rst
107+
97108
.. _convert-add-initial-shard:
98109

99110
Add Initial Replica Set as a Shard
@@ -113,9 +124,7 @@ second shard and adds it to the cluster. The replica set members are on
113124
the following hosts: ``mongodb3.example.net``,
114125
``mongodb4.example.net``, and ``mongodb5.example.net``.
115126

116-
.. versionchanged:: 3.4
117-
118-
.. include:: /includes/fact-3.4-shardsvr-required.rst
127+
.. include:: /includes/fact-shardsvr-required.rst
119128

120129
.. include:: /includes/steps/convert-replica-set-add-new-shard.rst
121130

0 commit comments

Comments
 (0)