Este conteúdo não está disponível no idioma selecionado.
Chapter 6. Upgrading Data Grid clusters
Data Grid Operator lets you upgrade Data Grid clusters from one version to another without downtime or data loss.
Hot Rod rolling upgrades are available as a technology preview feature.
6.1. Technology preview features Copiar o linkLink copiado para a área de transferência!
Technology preview features or capabilities are not supported with Red Hat production service-level agreements (SLAs) and might not be functionally complete.
Red Hat does not recommend using technology preview features or capabilities for production. These features provide early access to upcoming product features, which enables you to test functionality and provide feedback during the development process.
For more information, see Red Hat Technology Preview Features Support Scope.
6.2. Data Grid cluster upgrades Copiar o linkLink copiado para a área de transferência!
The spec.upgrades.type field controls how Data Grid Operator upgrades your Data Grid cluster when new versions become available. There are three types of cluster upgrade:
Shutdown- Upgrades Data Grid clusters, with service downtime, by bringing down the original cluster and bringing up a new one in its place. This is the default upgrade type.
InPlaceRolling- Upgrades Data Grid cluster pods to new patch releases individually, using a StatefulSet RollingUpdate.
HotRodRollingUpgrades Data Grid versions, without service downtime, by deploying a new cluster in parallel to the original and transitioning all traffic to it.
ImportantThe Operator does not automatically upgrade clusters to a new Data Grid server version. In order to trigger an upgrade, you must explicitly change the
spec.versionelement to a new version.
Shutdown upgrades
To perform a shutdown upgrade, Data Grid Operator does the following:
- Gracefully shuts down the existing cluster.
- Removes the existing cluster.
- Creates a new cluster with the target version.
InPlaceRolling upgrades
To perform a rolling upgrade, Data Grid Operator does the following:
- Checks if the Data Grid version supports rolling upgrades.
- Checks whether the current version and target version have matching major and minor versions.
- If the conditions above are met, the Operator will upgrade server pods one by one using a StatefulSet RollingUpdate.
=== When upgrading between different major or minor versions of the server, the "Shutdown" or "HotRodRolling" upgrade type is required. This must be configured in the CR spec at the the same time as the new version. ===
HotRodRolling upgrades
To perform a Hot Rod rolling upgrade, Data Grid Operator does the following:
- Creates a new Data Grid cluster with the target version that runs alongside your existing cluster.
- Creates a remote cache store to transfer data from the existing cluster to the new cluster.
- Redirects all clients to the new cluster.
- Removes the existing cluster when all data and client connections are transferred to the new cluster.
You should not perform Hot Rod rolling upgrades with caches that enable passivation with persistent cache stores. In the event that the upgrade does not complete successfully, passivation can result in data loss when Data Grid Operator rolls back the target cluster.
If your cache configuration enables passivation you should perform a shutdown upgrade.
6.3. Upgrading Data Grid clusters with downtime Copiar o linkLink copiado para a área de transferência!
Upgrading Data Grid clusters with downtime results in service disruption but does not require any additional capacity.
Prerequisites
If required, configure a persistent cache store to preserve your data during the upgrade.
ImportantAt the start of the upgrade process Data Grid Operator shuts down your existing cluster. This results in data loss if you do not configure a persistent cache store.
Procedure
-
Specify the Data Grid version number in the
spec.versionfield. Ensure that
Shutdownis set as the value for thespec.upgrades.typefield, which is the default.spec: version: 8.6.0-1 upgrades: type: Shutdownspec: version: 8.6.0-1 upgrades: type: ShutdownCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Apply your changes, if necessary.
6.4. Upgrading Data Grid clusters using InPlace rolling strategy Copiar o linkLink copiado para a área de transferência!
Upgrading Data Grid clusters using InPlace rolling strategy with no service downtime.
Prerequisites
- Upgrading to a new Data Grid server patch release
Procedure
-
Specify the Data Grid version number in the
spec.versionfield. Ensure that
InPlaceRollingis set as the value for thespec.upgrades.typefield.spec: version: 8.6.0-1 upgrades: type: InPlaceRollingspec: version: 8.6.0-1 upgrades: type: InPlaceRollingCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Apply your changes, if necessary.
6.5. Performing Hot Rod rolling upgrades for Data Grid clusters Copiar o linkLink copiado para a área de transferência!
Performing Hot Rod rolling upgrades lets you move to a new Data Grid version without service disruption. However, this upgrade type requires additional capacity and temporarily results in two Data Grid clusters with different versions running concurrently.
Prerequisite
- The Data Grid Operator version you have installed supports the Data Grid target version.
Procedure
-
Specify the Data Grid version number in the
spec.versionfield. Specify
HotRodRollingas the value for thespec.upgrades.typefield.spec: version: 8.6.0-1 upgrades: type: HotRodRollingspec: version: 8.6.0-1 upgrades: type: HotRodRollingCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Apply your changes.
6.5.1. Recovering from a failed Hot Rod rolling upgrade Copiar o linkLink copiado para a área de transferência!
You can roll back a failed Hot Rod rolling upgrade to the previous version if the original cluster is still present.
Prerequisites
- Hot Rod rolling upgrade is in progress and the initial Data Grid cluster is present.
Procedure
Ensure the Hot Rod rolling upgrade is in progress.
oc get infinispan <cr_name> -o yaml
oc get infinispan <cr_name> -o yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
status.hotRodRollingUpgradeStatusfield must be present.Update
spec.versionfield of yourInfinispan CRto the original cluster version defined in thestatus.hotRodRollingUpgradeStatus.Data Grid Operator deletes the newly created cluster.