How to upgrade (refresh) a sharded cluster

This guide goes over the steps to perform a minor in-place upgrade via juju refresh for a sharded cluster. Going forward, we will use the word “refresh” instead of “upgrade”.

See also

To upgrade from MongoDB 6 to 8, see How to perform a major version upgrade.

Refresh the config-server

Upgrade your config-server following the instructions in How to upgrade (refresh) a replica set.

Warning

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

Begin the refresh

After successfully refreshing your config-server, the next step is to upgrade your shards.

Refresh each shard one at a time. Start by refreshing the first shard, and follow the instructions in How to upgrade (refresh) a replica set.

Before upgrading the last shard, leave a burn-in period to ensure that everything is working correctly and that you do not have any kind of regression.

Only refresh the next shard when the current refresh succeeds - i.e. all units show active and idle statuses.

Warning

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

Upgrade mongos application

Next, upgrade any integrated mongos application.

See: