Downgrade Astra Trident

Contributors netapp-amitha Download PDF of this page

Learn about the steps involved in downgrading to an earlier version of Astra Trident.

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

When to downgrade

You should consider a downgrade when moving to a Astra Trident release that uses CRDs. Because Astra Trident now 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. If you need to downgrade, this should only be attempted for a version of Astra Trident that runs using CRDs (19.07 and later). This is to ensure that all the 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.

Steps
  1. Uninstall Astra Trident. Do not wipeout the CRDs unless you want to completely remove an existing installation.

  2. Delete the cluster-scoped operator. To do this, you will need the manifest used to deploy the operator. You can obtain it from the Trident GitHub repo. Make sure you switch to the required branch.

  3. 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.

Steps
  1. Uninstall Astra Trident. Do not wipeout the CRDs unless you want to completely remove an existing installation.
    Make sure the tridentorchestrator 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
  2. Delete the cluster-scoped operator. To do this, you will need the manifest used to deploy the operator. You can obtain it here from the Trident GitHub repo. Make sure you switch to the required branch.

  3. 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.

  4. 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.

Note 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.
Steps
  1. Make sure that Trident is installed by using tridentctl. If you are unsure about how Astra Trident is installed, run this simple test:

    1. List the pods present in the Trident namespace.

    2. 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.

    3. If you do not see a tridentOrchestrator, (or) a tridentprovisioner, (or) a pod named trident-operator-xxxxxxxxxx-xxxxx, Astra Trident is installed with tridentctl.

  2. 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.
  3. 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.