Upgrading your replication setup from the DBOD web
If you are the owner of a DBOD replication setup you must follow this guide in order to carry out the upgrade of your cluster.
Note
Owners of MySQL HA setups must contact the DBOD administrators in order to receive instructions on how to upgrade their clusters
As for any other instances, when a new upgrade for a DBOD instance belonging to a replicaiton setup is available, the upgrade icon (blue arrow, see picture below) as well as the upgrade checker icon (book icon) will be enabled.
The logic for upgrading a primary - replica/s setup is slightly different from the regular upgrade workflow. To begin with, the only way of enabling the upgrades for both, primary and replica/s is by executing the upgrade checker through the primary instance.
Warning
If you try to run the upgrade checker from a replica instance, the upgrade checker job will fail.
When it comes to upgrade a primary - replica setup, there are two use cases:
A. Major and Minor upgrades for MySQL and Minor upgrades for PostgreSQL setups
B. Major upgrades for PostgreSQL replication setups
Therefore, in order to successfully upgrade your replication setup, you must follow the approach that applies to your replication setup:
A. Major and Minor upgrades for MySQL and Minor upgrades for PostgreSQL setups
1. Run the upgrade checker on the primary
The first thing that needs to be done, is to run the upgrade checker on the primary. The upgrade checker, will do the following:
- Make sure that there are no incompatibilities that could make the upgrade process fail
- If no incompatibilities are found, enable the upgrade for each and every replica to this primary
- Let the primary upgrade disabled until all the replicas to this primary instance have been upgraded.
If the upgrade checker run was successful during the first run on the primary and the upgrade checker report does not contain any error, now the upgrade for all the replicas to this primary instance should be enabled. On the other hand, if the upgrade checker report contains errors, you must correct all the errors in the report and then run again the upgrade checker as many times as needed until all the errors are corrected.
2. Upgrade each and every replica
Once the upgrade is enabled for each of the replicas, run the upgrade on each and every replica of the replication setup.
3. Run the upgrade checker on the primary
Only once all the replicas have been upgraded:
Run again the upgrade checker on the primary instance. The upgrade checker will verify that there are no pending replicas to be upgraded, and if it is the case, it will enable the upgrade for the primary instance.
4. Upgrade the primary
Once the upgrade is enabled for the primary, it means that the primary instance can be safely upgraded without breaking any replication channel. You can then proceed to finally upgrade the primary instance.
B. Major upgrades for PostgreSQL replication setups
1. Run the upgrade checker on the primary
The first thing that needs to be done, is to run the upgrade checker on the primary. The upgrade checker, will do the following:
- Make sure that there are no incompatibilities that could make the upgrade process fail
- If no incompatibilities are found, enable the upgrade for the primary instance
- Let the replicas upgrade disabled
If the upgrade checker run was successful during the first run on the primary and the upgrade checker report does not contain any error, now the upgrade for the primary should be enabled. On the other hand, if the upgrade checker report contains errors, you must correct all the errors in the report and then run again the upgrade checker as many times as needed until all the errors are corrected.
2. Open a SNOW ticket to the DBOD admins
Create a SNOW Ticket to the database on demand service asking the DBOD admins for assistance rebuilding the replica after the upgrade. Be aware that if this is not previously agreed with the DBOD admins and you decide to go out and run the upgrade for the primary without notifying the DBOD administrators, chances are that we will not be able of assisting you right away after the upgrade of the primary and your replica might not be available for a longer period of time.
3. Upgrade the primary
Once the upgrade is enabled for the primary and once you have agreed on a date and time with the DBOD admins for the intervention, this means that the primary instance can be safely upgraded. You can then proceed to finally upgrade the primary instance.
4. Recreation of the replica
Let the DBOD admins know in the SNOW ticket that your primary has been upgraded, so they can proceed to recreate the replica.