Charmed Operator for MongoDB

Channel Revision Published Runs on
6/stable 61 15 Nov 2024
Ubuntu 22.04
6/candidate 61 15 Nov 2024
Ubuntu 22.04
6/beta 61 15 Nov 2024
Ubuntu 22.04
6/edge 61 15 Nov 2024
Ubuntu 22.04
5/edge 39 14 Dec 2023
Ubuntu 22.04
juju deploy mongodb-k8s --channel 6/edge
Show information

Platform:

How to perform a minor upgrade on a sharded cluster

This feature is only available on specific revisions in Charmed MongoDB K8s 6/stable, listed in Minor version upgrade > Supported revisions.

If you wish to upgrade to/from a different, non-supported revision, then perform a cluster migration via backup.


Here is a summary of the steps to perform a minor upgrade on a sharded cluster:

  1. Determine your current revision
  2. Determine new revision
  3. Upgrade config-server
  4. Upgrade shards
  5. Upgrade mongos applications

Step 1: Determine your current revision

Find determine your current revision:

juju status | grep <app-name> | head -1 | awk '{print $5}'

If your current revision is not in the list of supported revisions for upgrades, then you must perform a cluster migration via backup.

If the upgrade is unsuccessful, you will need this revision number to roll back your application.

Step 2: Determine new revision

Choose a revision to upgrade to from the list of available revisions to upgrade to. By the end of your upgrade, the config-servers and shards must all be on the same revision.

Step 3: Upgrade config-server

To upgrade your config-server, follow the instructions in how to upgrade a replica set

Do not proceed if this step was not successful. If your upgrade failed, roll back the cluster.

Step 4: Begin upgrade

If you succeeded in upgrade your config-server in Step 3, you may proceed to upgrade your shards.

Upgrade each shard one at a time. Start by upgrading the first shard and follow the instructions in how to upgrade a replica set.

Upgrade the next shard only when the current upgrade succeeds - i.e. all units show active and idle statuses.

Do not proceed if an upgrade of a shard fails. If an upgrade fails, rollback the entire cluster.

Step 5: Upgrade mongos applications

Next, upgrade any integrated mongos applications by following the Charmed Mongos K8s documentation on How to perform a minor version upgrade.