5 .. DANGER:: DATE: 01 NOV 2021.
7 DO NOT UPGRADE TO CEPH PACIFIC FROM AN OLDER VERSION.
9 A recently-discovered bug (https://tracker.ceph.com/issues/53062) can cause
10 data corruption. This bug occurs during OMAP format conversion for
11 clusters that are updated to Pacific. New clusters are not affected by this
14 The trigger for this bug is BlueStore's repair/quick-fix functionality. This
15 bug can be triggered in two known ways:
17 (1) manually via the ceph-bluestore-tool, or
18 (2) automatically, by OSD if ``bluestore_fsck_quick_fix_on_mount`` is set
21 The fix for this bug is expected to be available in Ceph v16.2.7.
23 DO NOT set ``bluestore_quick_fix_on_mount`` to true. If it is currently
24 set to true in your configuration, immediately set it to false.
26 DO NOT run ``ceph-bluestore-tool``'s repair/quick-fix commands.
28 Cephadm can safely upgrade Ceph from one bugfix release to the next. For
29 example, you can upgrade from v15.2.0 (the first Octopus release) to the next
30 point release, v15.2.1.
32 The automated upgrade process follows Ceph best practices. For example:
34 * The upgrade order starts with managers, monitors, then other daemons.
35 * Each daemon is restarted only after Ceph indicates that the cluster
36 will remain available.
40 The Ceph cluster health status is likely to switch to
41 ``HEALTH_WARNING`` during the upgrade.
45 In case a host of the cluster is offline, the upgrade is paused.
51 Before you use cephadm to upgrade Ceph, verify that all hosts are currently online and that your cluster is healthy by running the following command:
57 To upgrade (or downgrade) to a specific release, run the following command:
61 ceph orch upgrade start --ceph-version <version>
63 For example, to upgrade to v16.2.6, run the following command:
67 ceph orch upgrade start --ceph-version 16.2.6
71 From version v16.2.6 the Docker Hub registry is no longer used, so if you use Docker you have to point it to the image in the quay.io registry:
75 ceph orch upgrade start --image quay.io/ceph/ceph:v16.2.6
78 Monitoring the upgrade
79 ======================
81 Determine (1) whether an upgrade is in progress and (2) which version the
82 cluster is upgrading to by running the following command:
86 ceph orch upgrade status
88 Watching the progress bar during a Ceph upgrade
89 -----------------------------------------------
91 During the upgrade, a progress bar is visible in the ceph status output. It
94 .. code-block:: console
100 Upgrade to docker.io/ceph/ceph:v15.2.1 (00h 20m 12s)
101 [=======.....................] (time remaining: 01h 43m 31s)
103 Watching the cephadm log during an upgrade
104 ------------------------------------------
106 Watch the cephadm log by running the following command:
116 You can stop the upgrade process at any time by running the following command:
120 ceph orch upgrade stop
125 In case the new version is based on ``cephadm``, once done with the upgrade the user
126 has to update the ``cephadm`` package (or ceph-common package in case the user
127 doesn't use ``cephadm shell``) to a version compatible with the new version.
132 There are a few health alerts that can arise during the upgrade process.
134 UPGRADE_NO_STANDBY_MGR
135 ----------------------
137 This alert (``UPGRADE_NO_STANDBY_MGR``) means that Ceph does not detect an
138 active standby manager daemon. In order to proceed with the upgrade, Ceph
139 requires an active standby manager daemon (which you can think of in this
140 context as "a second manager").
142 You can ensure that Cephadm is configured to run 2 (or more) managers by
143 running the following command:
147 ceph orch apply mgr 2 # or more
149 You can check the status of existing mgr daemons by running the following
154 ceph orch ps --daemon-type mgr
156 If an existing mgr daemon has stopped, you can try to restart it by running the
161 ceph orch daemon restart <name>
166 This alert (``UPGRADE_FAILED_PULL``) means that Ceph was unable to pull the
167 container image for the target version. This can happen if you specify a
168 version or container image that does not exist (e.g. "1.2.3"), or if the
169 container registry can not be reached by one or more hosts in the cluster.
171 To cancel the existing upgrade and to specify a different target version, run
172 the following commands:
176 ceph orch upgrade stop
177 ceph orch upgrade start --ceph-version <version>
180 Using customized container images
181 =================================
183 For most users, upgrading requires nothing more complicated than specifying the
184 Ceph version number to upgrade to. In such cases, cephadm locates the specific
185 Ceph container image to use by combining the ``container_image_base``
186 configuration option (default: ``docker.io/ceph/ceph``) with a tag of
189 But it is possible to upgrade to an arbitrary container image, if that's what
190 you need. For example, the following command upgrades to a development build:
194 ceph orch upgrade start --image quay.io/ceph-ci/ceph:recent-git-branch-name
196 For more information about available container images, see :ref:`containers`.
201 Some users may prefer to upgrade components in phases rather than all at once.
202 The upgrade command, starting in 16.2.10 and 17.2.1 allows parameters
203 to limit which daemons are upgraded by a single upgrade command. The options in
204 include ``daemon_types``, ``services``, ``hosts`` and ``limit``. ``daemon_types``
205 takes a comma-separated list of daemon types and will only upgrade daemons of those
206 types. ``services`` is mutually exclusive with ``daemon_types``, only takes services
207 of one type at a time (e.g. can't provide an OSD and RGW service at the same time), and
208 will only upgrade daemons belonging to those services. ``hosts`` can be combined
209 with ``daemon_types`` or ``services`` or provided on its own. The ``hosts`` parameter
210 follows the same format as the command line options for :ref:`orchestrator-cli-placement-spec`.
211 ``limit`` takes an integer > 0 and provides a numerical limit on the number of
212 daemons cephadm will upgrade. ``limit`` can be combined with any of the other
213 parameters. For example, if you specify to upgrade daemons of type osd on host
214 Host1 with ``limit`` set to 3, cephadm will upgrade (up to) 3 osd daemons on
217 Example: specifying daemon types and hosts:
221 ceph orch upgrade start --image <image-name> --daemon-types mgr,mon --hosts host1,host2
223 Example: specifying services and using limit:
227 ceph orch upgrade start --image <image-name> --services rgw.example1,rgw.example2 --limit 2
231 Cephadm strictly enforces an order to the upgrade of daemons that is still present
232 in staggered upgrade scenarios. The current upgrade ordering is
233 ``mgr -> mon -> crash -> osd -> mds -> rgw -> rbd-mirror -> cephfs-mirror -> iscsi -> nfs``.
234 If you specify parameters that would upgrade daemons out of order, the upgrade
235 command will block and note which daemons will be missed if you proceed.
239 Upgrade commands with limiting parameters will validate the options before beginning the
240 upgrade, which may require pulling the new container image. Do not be surprised
241 if the upgrade start command takes a while to return when limiting parameters are provided.
245 In staggered upgrade scenarios (when a limiting parameter is provided) monitoring
246 stack daemons including Prometheus and node-exporter are refreshed after the Manager
247 daemons have been upgraded. Do not be surprised if Manager upgrades thus take longer
248 than expected. Note that the versions of monitoring stack daemons may not change between
249 Ceph releases, in which case they are only redeployed.
251 Upgrading to a version that supports staggered upgrade from one that doesn't
252 ----------------------------------------------------------------------------
254 While upgrading from a version that already supports staggered upgrades the process
255 simply requires providing the necessary arguments. However, if you wish to upgrade
256 to a version that supports staggered upgrade from one that does not, there is a
257 workaround. It requires first manually upgrading the Manager daemons and then passing
258 the limiting parameters as usual.
261 Make sure you have multiple running mgr daemons before attempting this procedure.
263 To start with, determine which Manager is your active one and which are standby. This
264 can be done in a variety of ways such as looking at the ``ceph -s`` output. Then,
265 manually upgrade each standby mgr daemon with:
269 ceph orch daemon redeploy mgr.example1.abcdef --image <new-image-name>
273 If you are on a very early version of cephadm (early Octopus) the ``orch daemon redeploy``
274 command may not have the ``--image`` flag. In that case, you must manually set the
275 Manager container image ``ceph config set mgr container_image <new-image-name>`` and then
276 redeploy the Manager ``ceph orch daemon redeploy mgr.example1.abcdef``
278 At this point, a Manager fail over should allow us to have the active Manager be one
279 running the new version.
285 Verify the active Manager is now one running the new version. To complete the Manager
290 ceph orch upgrade start --image <new-image-name> --daemon-types mgr
292 You should now have all your Manager daemons on the new version and be able to
293 specify the limiting parameters for the rest of the upgrade.