Skip to content

Commit a442cb5

Browse files
jmd-mongoandf-mongodb
authored andcommitted
DOCSP-13972 clean shutdown notice for v4.4 downgrade docs
1 parent bd108e0 commit a442cb5

File tree

4 files changed

+46
-54
lines changed

4 files changed

+46
-54
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Run the following command from the :binary:`~bin.mongo` shell to
2+
perform a clean shutdown, or refer to
3+
:ref:`terminate-mongod-processes` for additional ways to safely
4+
terminate the :binary:`~bin.mongod` process:
5+
6+
.. code-block:: javascript
7+
8+
db.adminCommand( { shutdown: 1 } )

source/includes/steps-4.4-downgrade-mongod.yaml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,28 @@ content: |
1010
1111
.. include:: /includes/downgrade-path.rst
1212
---
13-
title: "Restart with the latest |oldversion| ``mongod`` instance."
13+
title: "Shut down the ``mongod`` instance."
1414
level: 4
15-
ref: 4.4-downgrade-restart-instance
15+
ref: 4.4-downgrade-shutdown-instance
1616
content: |
17-
Shut down your :binary:`~bin.mongod` instance. Replace the existing
18-
binary with the downloaded :binary:`~bin.mongod` binary and restart.
19-
20-
a. Shut down your :binary:`~bin.mongod` instance. To safely terminate
21-
the :binary:`~bin.mongod` process, you can connect a
22-
:binary:`~bin.mongo` shell to the instance and run:
17+
18+
To cleanly shut down the :binary:`~bin.mongod` process, connect a
19+
:binary:`~bin.mongo` shell to the instance and run:
2320
24-
.. code-block:: javascript
21+
.. code-block:: javascript
2522
26-
db.adminCommand( { shutdown: 1 } )
23+
db.adminCommand( { shutdown: 1 } )
24+
25+
A :ref:`clean shutdown <terminate-mongod-processes>` of a
26+
:binary:`~bin.mongod` completes all pending operations,
27+
flushes all data to data files, and closes all data files.
28+
---
29+
title: "Restart with the latest |oldversion| ``mongod`` instance."
30+
level: 4
31+
ref: 4.4-downgrade-restart-instance
32+
content: |
2733
28-
b. Replace the |newversion| binary with the downloaded |oldversion|
29-
:binary:`~bin.mongod` binary and restart.
34+
Replace the |newversion| binary with the downloaded |oldversion|
35+
:binary:`~bin.mongod` binary and restart.
3036
31-
...
37+
...

source/includes/steps-4.4-downgrade-replica-set.yaml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ content: |
1717
Downgrade each :term:`secondary` member of the replica set, one at a
1818
time:
1919
20-
a. Shut down the :binary:`~bin.mongod`.
20+
a. .. include:: /includes/4.4-downgrade-clean-shutdown.rst
2121
22-
.. code-block:: javascript
23-
24-
db.adminCommand( { shutdown: 1 } )
25-
26-
#. Replace the |newversion| binary with the |oldversion| binary and restart.
22+
#. Replace the |newversion| binary with the |oldversion| binary and restart.
2723
2824
#. Wait for the member to recover to ``SECONDARY`` state
2925
before downgrading the next secondary. To check the member's state,
@@ -42,13 +38,7 @@ content: |
4238
Downgrade the :ref:`arbiter <replica-set-arbiter-configuration>` member of
4339
the replica set:
4440
45-
a. Shut down the :binary:`~bin.mongod`. See
46-
:ref:`terminate-mongod-processes` for additional ways to safely
47-
terminate :binary:`~bin.mongod` processes.
48-
49-
.. code-block:: javascript
50-
51-
db.adminCommand( { shutdown: 1 } )
41+
a. .. include:: /includes/4.4-downgrade-clean-shutdown.rst
5242
5343
#. Delete the contents of the arbiter data directory. The
5444
:setting:`storage.dbPath` configuration setting or
@@ -87,13 +77,9 @@ content: |
8777
When :method:`rs.status()` shows that the primary has stepped down
8878
and another member has assumed ``PRIMARY`` state:
8979
90-
a. Shut down the previous primary.
91-
92-
.. code-block:: javascript
93-
94-
db.adminCommand( { shutdown: 1 } )
80+
a. .. include:: /includes/4.4-downgrade-clean-shutdown.rst
9581
9682
b. Replace the :binary:`~bin.mongod` binary with
9783
the |oldversion| binary and restart.
9884
99-
...
85+
...

source/includes/steps-4.4-downgrade-sharded-cluster.yaml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ content: |
5656
A. Downgrade the shard's :ref:`secondary <replica-set-secondary-members>`
5757
members one at a time:
5858
59-
a. Shut down the :binary:`~bin.mongod` instance.
60-
61-
.. code-block:: javascript
62-
63-
db.adminCommand( { shutdown: 1 } )
59+
1. .. include:: /includes/4.4-downgrade-clean-shutdown.rst
6460
6561
#. Replace the |newversion|
6662
binary with the |oldversion| binary and restart.
@@ -76,13 +72,7 @@ content: |
7672
7773
Skip this step if the replica set does not include an arbiter.
7874
79-
a. Shut down the :binary:`~bin.mongod`. See
80-
:ref:`terminate-mongod-processes` for additional ways to safely
81-
terminate :binary:`~bin.mongod` processes.
82-
83-
.. code-block:: javascript
84-
85-
db.adminCommand( { shutdown: 1 } )
75+
1. .. include:: /includes/4.4-downgrade-clean-shutdown.rst
8676
8777
#. Delete the contents of the arbiter data directory. The
8878
:setting:`storage.dbPath` configuration setting or
@@ -101,7 +91,7 @@ content: |
10191
10292
#. Downgrade the shard's primary.
10393
104-
a. Step down the replica set primary. Connect a
94+
1. Step down the replica set primary. Connect a
10595
:binary:`~bin.mongo` shell to the primary and use
10696
:method:`rs.stepDown()` to step down the primary and force an
10797
election of a new primary:
@@ -119,7 +109,10 @@ content: |
119109
When the status shows that the primary has stepped down and
120110
another member has assumed ``PRIMARY`` state, proceed.
121111
122-
#. Shut down the stepped-down primary.
112+
#. Run the following command from the :binary:`~bin.mongo` shell to
113+
perform a clean shutdown of the stepped-down primary, or refer to
114+
:ref:`terminate-mongod-processes` for additional ways to safely
115+
terminate the :binary:`~bin.mongod` process:
123116
124117
.. code-block:: javascript
125118
@@ -138,11 +131,7 @@ content: |-
138131
A. Downgrade the :ref:`secondary <replica-set-secondary-members>`
139132
members of the config servers replica set (CSRS) one at a time:
140133
141-
a. Shut down the :binary:`~bin.mongod` instance.
142-
143-
.. code-block:: javascript
144-
145-
db.adminCommand( { shutdown: 1 } )
134+
1. .. include:: /includes/4.4-downgrade-clean-shutdown.rst
146135
147136
#. Replace the |newversion|
148137
binary with the |oldversion| binary and restart.
@@ -157,7 +146,7 @@ content: |-
157146
158147
#. Step down the config server primary.
159148
160-
a. Connect a :binary:`~bin.mongo` shell to the primary and use
149+
1. Connect a :binary:`~bin.mongo` shell to the primary and use
161150
:method:`rs.stepDown()` to step down the primary and force an
162151
election of a new primary:
163152
@@ -174,7 +163,10 @@ content: |-
174163
When the status shows that the primary has stepped down and
175164
another member has assumed ``PRIMARY`` state, proceed.
176165
177-
#. Shut down the stepped-down primary.
166+
#. Run the following command from the :binary:`~bin.mongo` shell to
167+
perform a clean shutdown of the stepped-down primary, or refer to
168+
:ref:`terminate-mongod-processes` for additional ways to safely
169+
terminate the :binary:`~bin.mongod` process:
178170
179171
.. code-block:: javascript
180172
@@ -201,4 +193,4 @@ content: |
201193
The :binary:`~bin.mongo` shell method :method:`sh.startBalancer()`
202194
also enables auto-splitting for the sharded cluster.
203195
204-
...
196+
...

0 commit comments

Comments
 (0)