For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

Upgrade a database

This document describes how to upgrade Cennso Database Operator and Cennso Database Instance. If you need to update the Cennso Database extension itself, read the Installation document.

You can upgrade both Cennso Database Operator and Cennso Database Instance, or one at a time.

Important

For this moment, Cennso Database does not support the upgrade of the following sub-components:

  • Upgrade to a new major version of MySQL - make sure you do not set the spec.mysql.image.tag parameter of the DBInstance composition to a newer major version of the MySQL server during upgrade.
  • Upgrade to a new version of Operator - make sure you do not set the spec.image and spec.chart parameters of the DBOperator composition to a newer version of the Operator during upgrade.

The upgrade process of the sub-components mentioned above is impossible because of absence of backward compatibility. If you need to upgrade these sub-components, you should create a new Cennso Database Instance with the desired version and migrate your data.

Before upgrading the database cluster, follow the general recommendations:

  • When upgrading the Cennso Database Instance under load, ensure your Cennso Database Operator has an adequate spec.replicationSyncWaitTimeOnUpgrade value configured. It is recommended to check the replication lag before the upgrade procedure and set the spec.replicationSyncWaitTimeOnUpgrade to not less than 5.

    Important

    Deprecated: This configuration option will be removed in the next release of the Cennso Database extension. Use spec.binaryDonor of the DBInstance Custom Resource instead. For more information, see Enable binary-donor.

  • To improve the performance of the upgrade process, you can set the spec.mysql.cloneRequiredOnAsyncCluster to false. This will skip the cloning process during the upgrade.

Select the extension version

The Cennso Database extension package ships a Composition for every Custom Resource it provides, such as DBOperator and DBInstance. Crossplane keeps the history of each Composition as composition revisions. Installing a new version of the package updates the Compositions and, as a result, creates a new composition revision for each of them, labelled with cennso.com/version of that package. Installing a new package version does not change existing databases: each DBOperator and DBInstance Custom Resource stays on the revision it was created with until you move it. A Custom Resource created without spec.compositionRevisionSelector is pinned in the same way to the revision that was the newest at the time of its creation.

A Custom Resource chooses its revision with spec.compositionRevisionSelector. The revision in use is recorded in spec.compositionRevisionRef of the underlying composite resource. Whether a later change of the selector takes effect depends on the value of the spec.compositionUpdatePolicy parameter:

  • Manual (default) - the selector is evaluated only once, when the Custom Resource is created. A later change of the label is accepted without an error but has no effect. To move the Custom Resource to another revision, set spec.compositionRevisionRef.name explicitly.
  • Automatic - the selector is evaluated on every reconciliation, and the Custom Resource follows the newest revision that matches the label. Changing the label is enough to move it. Without a selector, an Automatic Custom Resource follows the newest revision after every package installation.

The Manual default protects production databases from unintended changes. With Automatic, make sure every package version carries a unique cennso.com/version label. Otherwise, rebuilding a package with the reused version label changes the Custom Resource without any changes on your side.

To list the installed composition revisions of the MySQL Custom Resources together with their versions, use the following command on the Management Cluster. The MySQL composite resource kinds start with XDB, which grep uses to exclude other resources:

bash

Upgrade Cennso Database Operator

You can upgrade the Cennso Database Operator using either the Cennso Management Console (CMC) or the CLI:

To update the Cennso Database Operator using CMC:

  1. Go to Cennso Management → All resources and choose the DBOperator tile.
  2. Choose the DBOperator you want to upgrade.
  3. Press the Edit button.
  4. Go to the Specification tab and edit parameters you want to update.
  5. If you want to use a different version of the Cennso Database extension, open the Metadata tab and adjust the extension version using the Version field in the Composition section. The Version field sets spec.compositionRevisionSelector, which has no effect on an existing DBOperator because spec.compositionUpdatePolicy is Manual by default. Open the Manifest tab and either set spec.compositionRevisionRef.name to the revision of the new version, or set spec.compositionUpdatePolicy to Automatic, as described in the Select the extension version section.
  6. After you've edited all the parameters for the upgrade, press the Update button.
  7. Open the DBOperator again and check spec.compositionRevisionRef.name in the Manifest tab. It must show the revision of the new version. The database operator Deployment is restarted in the Core Cluster only when the new revision renders it differently.

Upgrade Cennso Database Instance

You can upgrade the Cennso Database Instance using either the Cennso Management Console (CMC) or the CLI:

To update the Cennso Database Instance using CMC:

  1. Go to Cennso Management → All resources and choose the DBInstance tile.
  2. Choose the DBInstance you want to upgrade.
  3. Press the Edit button.
  4. Go to the Specification tab and edit parameters you want to update.
  5. If you want to use a different version of the Cennso Database extension, open the Metadata tab and adjust the extension version using the Version field in the Composition section. The Version field sets spec.compositionRevisionSelector, which has no effect on an existing DBInstance because spec.compositionUpdatePolicy is Manual by default. Open the Manifest tab and either set spec.compositionRevisionRef.name to the revision of the new version, or set spec.compositionUpdatePolicy to Automatic, as described in the Select the extension version section.
  6. After you've edited all the parameters for the upgrade, press the Update button.
  7. Open the DBInstance again and check spec.compositionRevisionRef.name in the Manifest tab. It must show the revision of the new version. The DBInstance stays not ready while the composed resources with changed renderings are updated in the Core Cluster. This update may restart the related pods. The DBInstance becomes ready again when the upgrade is complete.

Roll back an upgrade

A rollback to the previous version of the Cennso Database extension uses the same mechanism as the upgrade. The composition revisions of the previous package version stay available on the Management Cluster after a newer version is installed, so you do not need to reinstall the previous package.

To roll back a DBOperator or DBInstance, point it at the previous revision in the same way you moved it forward. If spec.compositionUpdatePolicy is set to Automatic, you can only set the previous version in the cennso.com/version label of the selector. Otherwise, you should set spec.compositionRevisionRef.name to the previous revision name.

Then, apply the manifest and verify the revision as described in the upgrade steps above.