-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathsteps-upgrade-enterprise-sharded-cluster.yaml
More file actions
145 lines (102 loc) · 4.38 KB
/
steps-upgrade-enterprise-sharded-cluster.yaml
File metadata and controls
145 lines (102 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
title: Disable the Balancer.
level: 4
ref: upgrade-enterprise-disable-balancer
content: |
Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance in
the sharded cluster, and run :method:`sh.stopBalancer()` to
disable the balancer:
.. code-block:: javascript
sh.stopBalancer()
.. note::
If a migration is in progress, the system will complete the
in-progress migration before stopping the balancer. You can run
:method:`sh.isBalancerRunning()` to check the balancer's current
state.
To verify that the balancer is disabled, run
:method:`sh.getBalancerState()`, which returns false if the balancer
is disabled:
.. code-block:: javascript
sh.getBalancerState()
.. include:: /includes/extracts/4.2-changes-stop-balancer-autosplit.rst
For more information on disabling the balancer, see
:ref:`sharding-balancing-disable-temporarily`.
---
title: "Upgrade the config servers."
level: 4
ref: upgrade-enterprise-config-servers
content: |-
1. Upgrade the :ref:`secondary <replica-set-secondary-members>`
members of the replica set one at a time:
a. Shut down the secondary :binary:`~bin.mongod` instance.
#. Restart the member with the Enterprise :binary:`~bin.mongod`,
specifying the same configuration options (e.g. same
data directory, configuration file, etc.).
#. Wait for the member to recover to ``SECONDARY`` state before
upgrading the next secondary member. To check the member's state,
issue :method:`rs.status()` in :binary:`~bin.mongosh`.
Repeat for each remaining secondary member.
#. Step down the replica set primary.
Connect :binary:`~bin.mongosh` to the primary and use
:method:`rs.stepDown()` to step down the primary and force an
election of a new primary:
.. code-block:: javascript
rs.stepDown()
#. When :method:`rs.status()` shows that the primary has stepped
down and another member is primary, upgrade the stepped-down
primary:
a. Shut down the stepped-down primary.
#. Restart with the Enterprise :binary:`~bin.mongod`,
specifying the same configuration options (e.g. same
data directory, configuration file, etc.).
---
title: Upgrade the shards.
level: 4
ref: upgrade-enterprise-shards
content: |-
Upgrade the shards one at a time.
For each shard replica set:
1. Upgrade the :ref:`secondary <replica-set-secondary-members>`
members of the replica set one at a time:
a. Shut down the secondary :binary:`~bin.mongod` instance.
#. Restart the member with the Enterprise :binary:`~bin.mongod`,
specifying the same configuration options (e.g. same
data directory, configuration file, etc.).
#. Wait for the member to recover to ``SECONDARY`` state before
upgrading the next secondary member. To check the member's state,
issue :method:`rs.status()` in :binary:`~bin.mongosh`.
Repeat for each remaining secondary member.
#. Step down the replica set primary.
Connect :binary:`~bin.mongosh` to the primary and use
:method:`rs.stepDown()` to step down the primary and force an
election of a new primary:
.. code-block:: javascript
rs.stepDown()
#. When :method:`rs.status()` shows that the primary has stepped
down and another member is primary, upgrade the stepped-down
primary:
a. Shut down the stepped-down primary.
#. Restart with the Enterprise :binary:`~bin.mongod`,
specifying the same configuration options (e.g. same
data directory, configuration file, etc.).
---
title: "Upgrade the ``mongos`` instances."
level: 4
ref: upgrade-enterprise-mongos-instances
content: |-
For each :binary:`~bin.mongos` instance, shutdown
:binary:`~bin.mongos` and restart with the Enterprise :binary:`~bin.mongos`,
specifying the same configuration options.
---
title: "Re-enable the balancer."
level: 4
ref: upgrade-enterprise-reenable-balancer
content: |-
Using :binary:`~bin.mongosh`, connect to a
:binary:`~bin.mongos` in the cluster and run
:method:`sh.startBalancer()` to re-enable the balancer:
.. code-block:: javascript
sh.startBalancer()
.. include:: /includes/extracts/4.2-changes-start-balancer-autosplit.rst
For more information on the balancer, see
:ref:`sharding-balancing-enable`.
...