Downgrade Astra Trident
Learn about the steps involved in downgrading to an earlier version of Astra Trident.
When to downgrade
You might consider downgrading for various reasons, such as the following:
-
Contingency planning
-
Immediate fix for bugs observed as a result of an upgrade
-
Dependency issues, unsuccessful and incomplete upgrades
You should consider a downgrade when moving to a Astra Trident release that uses CRDs. Because Astra Trident uses CRDs for maintaining state, all storage entities created (backends, storage classes, PV, and volume snapshots) have associated CRD objects instead of data written into the trident
PV (used by the earlier installed version of Astra Trident). Newly created PVs, backends, and storage classes are all maintained as CRD objects.
Only attempt downgrade for a version of Astra Trident that runs using CRDs (19.07 and later). This ensures operations performed on the current Astra Trident release are visible after the downgrade occurs.
When not to downgrade
You should not downgrade to a release of Trident that uses etcd
to maintain state (19.04 and earlier). All operations performed with the current Astra Trident release are not reflected after the downgrade. Newly created PVs are not usable when moving back to an earlier version. Changes made to objects such as backends, PVs, storage classes, and volume snapshots (created/updated/deleted) are not visible to Astra Trident when moving back to an earlier version. Going back to an earlier version does not disrupt access for PVs that were already created by using the older release, unless they have been upgraded.
Downgrade process when Astra Trident is installed by using the operator
For installations done using the Trident Operator, the downgrade process is different and does not require the use of tridentctl
.
For installations done using the Trident operator, Astra Trident can be downgraded to either of the following:
-
A version that is installed using the namespace-scoped operator (20.07 - 20.10).
-
A version that is installed using the cluster-scoped operator (21.01 and later).
Downgrade to cluster-scoped operator
To downgrade Astra Trident to a release that uses the cluster-scoped operator, follow the steps mentioned below.
-
Uninstall Astra Trident. Do not delete the CRDs unless you want to completely remove an existing installation.
-
The Trident operator can be deleted by using the operator manifest associated with your version of Trident. For example,
https://github.com/NetApp/trident/tree/stable/vXX.XX/deploy/bundle.yaml
wherevXX.XX
is the version number (for examplev22.10
) andbundle.yaml
is the bundle YAML file name. -
Continue downgrading by installing the desired version of Astra Trident. Follow the documentation for the desired release.
Downgrade to namespace-scoped operator
This section summarizes the steps involved in downgrading to an Astra Trident release that falls in the range 20.07 through 20.10, which will be installed using the namespace-scoped operator.
-
Uninstall Astra Trident. Do not wipeout the CRDs unless you want to completely remove an existing installation.
Make sure thetridentorchestrator
is deleted.#Check to see if there are any tridentorchestrators present kubectl get torc NAME AGE trident 20h #Looks like there is a tridentorchestrator that needs deleting kubectl delete torc trident tridentorchestrator.trident.netapp.io "trident" deleted
-
The Trident operator can be deleted by using the operator manifest associated with your version of Trident. For example,
https://github.com/NetApp/trident/tree/stable/vXX.XX/deploy/bundle.yaml
wherevXX.XX
is the version number (for examplev22.10
) andbundle.yaml
is the bundle YAML file name. -
Delete the
tridentorchestrator
CRD.#Check to see if ``tridentorchestrators.trident.netapp.io`` CRD is present and delete it. kubectl get crd tridentorchestrators.trident.netapp.io NAME CREATED AT tridentorchestrators.trident.netapp.io 2021-01-21T21:11:37Z kubectl delete crd tridentorchestrators.trident.netapp.io customresourcedefinition.apiextensions.k8s.io "tridentorchestrators.trident.netapp.io" deleted
Astra Trident has been uninstalled.
-
Continue downgrading by installing the desired version. Follow the documentation for the desired release.
Downgrade by using Helm
To downgrade, use the helm rollback
command. See the following example:
helm rollback trident [revision #]
Downgrade process when Astra Trident is installed by using tridentctl
If you installed Astra Trident by using tridentctl
, the downgrade process involves the following steps. This sequence walks you through the downgrade process to move from Astra Trident 21.07 to 20.07.
Before beginning the downgrade, you should take a snapshot of your Kubernetes cluster’s etcd . This enables you to back up the current state of Astra Trident’s CRDs.
|
-
Make sure that Trident is installed by using
tridentctl
. If you are unsure about how Astra Trident is installed, run this simple test:-
List the pods present in the Trident namespace.
-
Identify the version of Astra Trident running in your cluster. You can either use
tridentctl
or take a look at the image used in the Trident pods. -
If you do not see a
tridentOrchestrator
, (or) atridentprovisioner
, (or) a pod namedtrident-operator-xxxxxxxxxx-xxxxx
, Astra Trident is installed withtridentctl
.
-
-
Uninstall Astra Trident with the existing
tridentctl
binary. In this case, you will uninstall with the 21.07 binary.tridentctl version -n trident +----------------+----------------+ | SERVER VERSION | CLIENT VERSION | +----------------+----------------+ | 21.07.0 | 21.07.0 | +----------------+----------------+ tridentctl uninstall -n trident INFO Deleted Trident deployment. INFO Deleted Trident daemonset. INFO Deleted Trident service. INFO Deleted Trident secret. INFO Deleted cluster role binding. INFO Deleted cluster role. INFO Deleted service account. INFO Deleted pod security policy. podSecurityPolicy=tridentpods INFO The uninstaller did not delete Trident's namespace in case it is going to be reused. INFO Trident uninstallation succeeded.
-
After this is complete, obtain the Trident binary for the desired version (in this example, 20.07), and use it to install Astra Trident. You can generate custom YAMLs for a customized installation if needed.
cd 20.07/trident-installer/ ./tridentctl install -n trident-ns INFO Created installer service account. serviceaccount=trident-installer INFO Created installer cluster role. clusterrole=trident-installer INFO Created installer cluster role binding. clusterrolebinding=trident-installer INFO Created installer configmap. configmap=trident-installer ... ... INFO Deleted installer cluster role binding. INFO Deleted installer cluster role. INFO Deleted installer service account.
The downgrade process is complete.