Skip to content

Commit ffab55f

Browse files
committed
DOCSP-966: 3.6 downgrade
1 parent 8cdd61e commit ffab55f

14 files changed

+616
-52
lines changed

source/includes/3.6-downgrade-fcv.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Downgrade the ``featureCompatibilityVersion`` to ``"3.4"``.
2+
3+
.. code-block:: javascript
4+
5+
db.adminCommand({setFeatureCompatibilityVersion: "3.4"})
6+
7+
This command must perform writes to an internal system collection.
8+
If for any reason the command does not complete successfully, you
9+
can safely retry the command on the |target| as the operation is
10+
idempotent.
11+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Once upgraded to |newversion|, you can only |downgrade| to .
1+
Once upgraded to |newversion|, we recommend |downgrading| to the latest patch release of 3.4

source/includes/list-table-featureCompatibilityVersion-defaults.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22
:header-rows: 1
33
:widths: 30 70
44

5-
* - 3.6 Deployments
5+
* - Deployments
66
- ``featureCompatibilityVersion``
77

8-
* - For new deployments
8+
* - For new 3.6 deployments
99
- ``"3.6"``
1010

1111
* - For deployments :ref:`upgraded from 3.4 <3.6-upgrade>`
1212

1313
- ``"3.4"`` until you :dbcommand:`setFeatureCompatibilityVersion`
1414
to ``"3.6"``.
15+
16+
* - For new 3.4 deployments
17+
- ``"3.4"``
18+
19+
* - For deployments :ref:`upgraded from 3.2 <3.4-upgrade>`
20+
21+
- ``"3.2"`` until you :dbcommand:`setFeatureCompatibilityVersion`
22+
to ``"3.4"``.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
title: "Download the latest |oldversion| binaries."
2+
level: 4
3+
ref: 3.6-downgrade-binaries-mongod
4+
content: |
5+
6+
Using either a package manager or a manual download, get the latest
7+
release in the |oldversion| series. If using a package manager, add a new
8+
repository for the |oldversion| binaries, then perform the actual downgrade
9+
process.
10+
11+
.. include:: /includes/3.6-downgrade-path.rst
12+
---
13+
title: "Restart with the latest |oldversion| ``mongod`` instance."
14+
level: 4
15+
ref: 3.6-downgrade-restart-instance
16+
content: |
17+
Shut down your :program:`mongod` instance. Replace the existing
18+
binary with the downloaded :program:`mongod` binary and restart.
19+
...
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
title: "Download the latest |oldversion| binaries."
2+
level: 4
3+
ref: 3.6-downgrade-binaries-rs
4+
content: |
5+
Using either a package manager or a manual download, get the latest
6+
release in the |oldversion| series. If using a package manager, add a new
7+
repository for the |oldversion| binaries, then perform the actual downgrade
8+
process.
9+
10+
.. include:: /includes/3.6-downgrade-path.rst
11+
---
12+
title: "Downgrade secondary members of the replica set."
13+
level: 4
14+
ref: downgrade-secondaries
15+
content: |
16+
17+
Downgrade each :term:`secondary` member of the replica set, one at a
18+
time:
19+
20+
a. Shut down the :program:`mongod`. See :ref:`terminate-mongod-processes` for instructions on safely terminating :program:`mongod` processes.
21+
22+
#. Replace the |newversion| binary with the |oldversion| binary and restart.
23+
24+
#. Wait for the member to recover to ``SECONDARY`` state
25+
before downgrading the next secondary. To check the member's state,
26+
use the :method:`rs.status()` method in the :program:`mongo` shell.
27+
28+
---
29+
title: Step down the primary.
30+
level: 4
31+
ref: step-down-primary
32+
pre: |
33+
Use :method:`rs.stepDown()` in the :program:`mongo` shell to
34+
step down the :term:`primary` and force the normal :ref:`failover
35+
<replica-set-failover>` procedure.
36+
action:
37+
language: javascript
38+
code:
39+
rs.stepDown()
40+
post: |
41+
:method:`rs.stepDown()` expedites the failover procedure and is
42+
preferable to shutting down the primary directly.
43+
---
44+
title: "Replace and restart former primary ``mongod``."
45+
level: 4
46+
ref: downgrade-primary
47+
content: |
48+
When :method:`rs.status()` shows that the primary has stepped down
49+
and another member has assumed ``PRIMARY`` state, shut down the
50+
previous primary and replace the :program:`mongod` binary with
51+
the |oldversion| binary and start the new instance.
52+
...
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
title: "Download the latest |oldversion| binaries."
2+
level: 4
3+
ref: 3.6-downgrade-binaries-sharded-cluster
4+
content: |
5+
Using either a package manager or a manual download, get the latest
6+
release in the |oldversion| series. If using a package manager, add a new
7+
repository for the |oldversion| binaries, then perform the actual downgrade
8+
process.
9+
10+
.. include:: /includes/3.6-downgrade-path.rst
11+
---
12+
title: Disable the Balancer.
13+
level: 4
14+
ref: disable-balancer
15+
content: |
16+
Turn off the balancer as described in
17+
:ref:`sharding-balancing-disable-temporarily`.
18+
---
19+
title: "Downgrade the ``mongos`` instances."
20+
level: 4
21+
ref: downgrade-mongos
22+
content: |
23+
Downgrade the binaries and restart.
24+
---
25+
title: Downgrade each shard, one at a time.
26+
level: 4
27+
ref: 3.6-downgrade-shard
28+
content: |
29+
30+
Downgrade the shards one at a time. If the shards are replica sets, for each shard:
31+
32+
1. Downgrade the :ref:`secondary <replica-set-secondary-members>`
33+
members of the replica set one at a time:
34+
35+
a. Shut down the :program:`mongod` instance and replace the |newversion|
36+
binary with the |oldversion| binary.
37+
38+
#. Start the |oldversion| binary with the ``--shardsvr`` and
39+
``--port`` command line options. Include any other
40+
configuration as appropriate for your deployment, e.g.
41+
``--bind_ip``.
42+
43+
.. code-block:: sh
44+
45+
mongod --shardsvr --port <port> --dbpath <path> --bind_ip localhost,<ip address>
46+
47+
Or if using a :doc:`configuration file
48+
</reference/configuration-options>`, update the file to
49+
include :setting:`sharding.clusterRole: shardsvr
50+
<sharding.clusterRole>`, :setting:`net.port`, and any other
51+
configuration as appropriate for your deployment, e.g.
52+
:setting:`net.bindIp`, and start:
53+
54+
.. code-block:: yaml
55+
56+
sharding:
57+
clusterRole: shardsvr
58+
net:
59+
port: <port>
60+
bindIp: localhost,<ip address>
61+
storage:
62+
dbpath: <path>
63+
64+
65+
#. Wait for the member to recover to ``SECONDARY`` state before
66+
downgrading the next secondary member. To check the member's
67+
state, you can issue :method:`rs.status()` in the
68+
:program:`mongo` shell.
69+
70+
Repeat for each secondary member.
71+
72+
#. Step down the replica set primary.
73+
74+
Connect a :program:`mongo` shell to the primary and use
75+
:method:`rs.stepDown()` to step down the primary and force an
76+
election of a new primary:
77+
78+
.. code-block:: javascript
79+
80+
rs.stepDown()
81+
82+
#. When :method:`rs.status()`
83+
shows that the primary has stepped down and another member
84+
has assumed ``PRIMARY`` state, downgrade the stepped-down primary:
85+
86+
1. Shut down the stepped-down primary and replace the
87+
:program:`mongod` binary with the |oldversion| binary.
88+
89+
#. Start the |oldversion| binary with the ``--shardsvr`` and
90+
``--port`` command line options. Include any other
91+
configuration as appropriate for your deployment, e.g.
92+
``--bind_ip``.
93+
94+
.. code-block:: sh
95+
96+
mongod --shardsvr --port <port> --dbpath <path> --bind_ip localhost,<ip address>
97+
98+
Or if using a :doc:`configuration file
99+
</reference/configuration-options>`, update the file to
100+
include :setting:`sharding.clusterRole: shardsvr
101+
<sharding.clusterRole>`, :setting:`net.port`, and any other
102+
configuration as appropriate for your deployment, e.g.
103+
:setting:`net.bindIp`, and start the |oldversion| binary:
104+
105+
.. code-block:: yaml
106+
107+
sharding:
108+
clusterRole: shardsvr
109+
net:
110+
port: <port>
111+
bindIp: localhost,<ip address>
112+
storage:
113+
dbpath: <path>
114+
---
115+
title: "Downgrade the config servers."
116+
level: 4
117+
ref: 3.6-downgrade-config-servers
118+
content: |-
119+
If the config servers are replica sets:
120+
121+
1. Downgrade the :ref:`secondary <replica-set-secondary-members>`
122+
members of the replica set one at a time:
123+
124+
a. Shut down the secondary :program:`mongod` instance and replace
125+
the |newversion| binary with the |oldversion| binary.
126+
127+
#. Start the |oldversion| binary with both the ``--configsvr`` and
128+
``--port`` options. Include any other
129+
configuration as appropriate for your deployment, e.g.
130+
``--bind_ip``.
131+
132+
.. code-block:: sh
133+
134+
mongod --configsvr --port <port> --dbpath <path> --bind_ip localhost,<ip address>
135+
136+
If using a :doc:`configuration file
137+
</reference/configuration-options>`, update the file to
138+
specify :setting:`sharding.clusterRole: configsvr
139+
<sharding.clusterRole>`, :setting:`net.port`, and any other
140+
configuration as appropriate for your deployment, e.g.
141+
:setting:`net.bindIp`, and start the |oldversion| binary:
142+
143+
.. code-block:: yaml
144+
145+
sharding:
146+
clusterRole: configsvr
147+
net:
148+
port: <port>
149+
bindIp: localhost,<ip address>
150+
storage:
151+
dbpath: <path>
152+
153+
Include any other configuration as appropriate for your deployment.
154+
155+
#. Wait for the member to recover to ``SECONDARY`` state before
156+
downgrading the next secondary member. To check the member's state,
157+
issue :method:`rs.status()` in the :program:`mongo` shell.
158+
159+
Repeat for each secondary member.
160+
161+
#. Step down the replica set primary.
162+
163+
a. Connect a :program:`mongo` shell to the primary and use
164+
:method:`rs.stepDown()` to step down the primary and force an
165+
election of a new primary:
166+
167+
.. code-block:: javascript
168+
169+
rs.stepDown()
170+
171+
#. When :method:`rs.status()` shows that the primary has stepped
172+
down and another member has assumed ``PRIMARY`` state, shut down
173+
the stepped-down primary and replace the :program:`mongod` binary
174+
with the |oldversion| binary.
175+
176+
#. Start the |oldversion| binary with both the ``--configsvr`` and
177+
``--port`` options. Include any other
178+
configuration as appropriate for your deployment, e.g.
179+
``--bind_ip``.
180+
181+
.. code-block:: sh
182+
183+
mongod --configsvr --port <port> --dbpath <path> --bind_ip localhost,<ip address>
184+
185+
If using a :doc:`configuration file
186+
</reference/configuration-options>`, update the file to
187+
specify :setting:`sharding.clusterRole: configsvr
188+
<sharding.clusterRole>`, :setting:`net.port`, and any other
189+
configuration as appropriate for your deployment, e.g.
190+
:setting:`net.bindIp`, and start the |oldversion| binary:
191+
192+
.. code-block:: yaml
193+
194+
sharding:
195+
clusterRole: configsvr
196+
net:
197+
port: <port>
198+
bindIp: localhost,<ip address>
199+
storage:
200+
dbpath: <path>
201+
202+
---
203+
title: "Re-enable the balancer."
204+
level: 4
205+
ref: reenable-balancer
206+
content: |
207+
Once the downgrade of sharded cluster components is
208+
complete, :ref:`re-enable the balancer <sharding-balancing-enable>`.
209+
...

0 commit comments

Comments
 (0)