Skip to content

Commit 2244b44

Browse files
author
Greg Studer
committed
Update source/release-notes/2.4-upgrade.txt
Added section about forcing the upgradeLock and retrying for local mongos crashes during upgrade.
1 parent eb2486a commit 2244b44

File tree

1 file changed

+42
-7
lines changed

1 file changed

+42
-7
lines changed

source/release-notes/2.4-upgrade.txt

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ following procedures.
2525

2626
2. Stop all processes in the cluster. Upgrade all processes to a
2727
2.4-series release of MongoDB, and start all processes at the same
28-
2.time.
28+
time.
2929

3030
.. _upgrade-cluster-upgrade:
3131

@@ -65,6 +65,11 @@ procedure.
6565
1. Turn off the :ref:`balancer <sharding-balancing-internals>` in the
6666
:term:`sharded cluster`, as described in
6767
:ref:`sharding-balancing-disable-temporally`.
68+
69+
If you wish, *after* turning off the balancer you may make a backup
70+
copy of the config database by using :program:`mongodump` or other
71+
tools. The upgrade process also creates its own backup collections
72+
which may be removed after the upgrade is verified complete.
6873

6974
#. Ensure there are no version 2.0 :program:`mongod` or
7075
:program:`mongos` processes still active in the sharded
@@ -94,22 +99,52 @@ procedure.
9499

95100
The upgrade will prevent any chunk moves or splits from occurring
96101
during the upgrade process. If there are very many sharded
97-
collections, acquiring the locks for all collections may take
102+
collections or there are stale locks held by other failed processes,
103+
acquiring the locks for all collections can take
98104
seconds or minutes. See the log for progress updates.
99105

100106
#. When the :program:`mongos` process starts successfully, the upgrade is
101107
complete. If the :program:`mongos` process fails to start, check the
102108
log for more information.
103109

104-
If a network interruption occurred and prevented changes, see
105-
:ref:`upgrade-cluster-resync`.
110+
If a network problem occurred or the :program:`mongos` program is somehow
111+
terminated during the upgrade, the upgrade process is generally retryable
112+
if not in the short critical section.
113+
114+
If on retry the upgrade process waits on the upgrade lock, this means a
115+
previous upgrade process may still be active or has ended abnormally. After
116+
15 minutes of no remote activity the upgrade lock will be forced, but if
117+
you can verify the upgrade process is no longer active you may force this lock
118+
manually:
119+
120+
.. code-block:: sh
121+
122+
mongo <2.2 mongos port>
123+
124+
.. code-block:: javascript
125+
126+
db.getMongo().getCollection("config.locks").findOne({ _id : "upgradeLock" })
127+
128+
If the host mentioned in the process field of this lock is known to be offline,
129+
you may then run:
130+
131+
.. code-block:: javascript
132+
133+
db.getMongo().getCollection("config.locks").update({ _id : "upgradeLock" }, { $set : { state : 0 } })
134+
135+
It is safer to wait for the mongos to verify inactivity if you have any doubt
136+
about whether another upgrade is occurring.
137+
138+
If a network interruption occurred and prevented changes during the critical
139+
section, you will get a message on retry to follow the instructions
140+
here :ref:`upgrade-cluster-resync`.
106141

107142
#. :ref:`Re-enable the balancer
108143
<sharding-balancing-disable-temporally>`. You can now perform
109144
operations that modify cluster metadata.
110-
145+
111146
#. Upgrade and restart other :program:`mongos` processes in the
112-
sharded cluster, without the :option:`--upgrade <mongos --upgrade>`
147+
sharded cluster, *without* the :option:`--upgrade <mongos --upgrade>`
113148
option.
114149

115150
Once you have upgraded, *do not* introduce version 2.0 MongoDB
@@ -138,7 +173,7 @@ To resync the config servers:
138173
1. Turn off the :ref:`balancer <sharding-balancing-internals>` in the
139174
sharded cluster and stop all metadata operations. If you are in the
140175
middle of an upgrade process (:ref:`upgrade-cluster-upgrade`), you
141-
have already disabled the balancer. .
176+
have already disabled the balancer.
142177

143178
#. Shut down two of the three config servers, preferably the last two listed
144179
in the :setting:`configdb` string. For example, if your :setting:`configdb`

0 commit comments

Comments
 (0)