Upgrade Longhorn Manager

It is recommended to create a Longhorn system backup before performing the upgrade. This ensures that all critical resources, such as volumes and backing images, are backed up and can be restored in case any issues arise.

Upgrading from v1.8.x

SUSE Storage only supports upgrading to v1.9 from v1.8.x. For other versions, please upgrade to v1.8.x first.

For airgap upgrades when SUSE Storage is installed as a Rancher app, you will need to modify the image names and remove the registry URL part.

For air-gapped upgrades when SUSE Storage is installed as a Rancher app, you will need to modify the image names and remove the registry URL part. For example, the image registry.example.com/longhorn/longhorn-manager:v1.9.2 is changed to longhorn/longhorn-manager:v1.9.2 in Longhorn images section. For more information, see the air gap installation steps here.

Preparing for the Upgrade

The current default StorageClass has the following parameters:

parameters:
  numberOfReplicas: <user specified replica count, 3 by default>
  staleReplicaTimeout: "30"
  fromBackup: ""
  baseImage: ""

Upgrade

Always back up volumes before upgrading. If anything goes wrong, you can restore the volume using the backup.

Upgrade Using the Rancher Prime UI

For Kubernetes clusters managed by Rancher, you can upgrade the SUSE Storage App by updating the repository to reference a newer Helm chart version.

The following procedure describes how to upgrade the SUSE Storage App on Rancher Prime.

  1. Go to Apps > Repositories.

  2. Select the OCI repository.

  3. In the OCI Repository Host URL field, enter:

    oci://dp.apps.rancher.io/charts/suse-storage:1.9.2

    Add Repository
  4. Verify that the repository has been added successfully.

    Repository Added
  5. Go to Apps > Charts and find the suse-storage chart.

    Find Chart
  6. Click the chart, and then click Install.

    Install Chart
  7. On the next page, set global.imagePullSecrets to application-collection, and then click Install.

    Refer to the authentication documentation for credential setup.

    global:
      cattle:
        windowsCluster:
          defaultSetting:
            systemManagedComponentsNodeSelector: kubernetes.io/os:linux
            taintToleration: cattle.io/os=linux:NoSchedule
          enabled: false
          nodeSelector:
            kubernetes.io/os: linux
          tolerations:
            - effect: NoSchedule
              key: cattle.io/os
              operator: Equal
              value: linux
      imagePullSecrets: [application-collection]
      imageRegistry: ''
  8. This installs suse-storage v1.9.1.

    Update Repository
  9. After installation, go to Apps > Repositories.

  10. Select the suse-storage repository, click the three-dot menu on the right, and choose Edit Config.

  11. Update the URL from:

    oci://dp.apps.rancher.io/charts/suse-storage:1.9.1

    to:

    oci://dp.apps.rancher.io/charts/suse-storage:1.9.2

  12. The repository should be updated successfully.

    Update Repository
  13. Go to Apps > Installed Apps.

  14. In the longhorn-system namespace, under the Upgradable column, look for a yellow-highlighted 1.9.2 label. If you do not see the yellow label, refresh the page.

    Upgradable Version
  15. Click the yellow 1.9.2 label to open the upgrade page.

    Upgrade Page
  16. Click Next.

  17. Ensure that global.imagePullSecrets is set to application-collection, and then click Upgrade to start the process.

    Upgrade Progress
  18. After the upgrade completes, verify that the suse-storage chart version is updated to 1.9.2.

    Upgrade Success

Upgrade with Helm

Upgrading the SUSE Storage Helm chart involves updating your deployment to a newer version or switching between Longhorn community images and SUSE Storage images.

The general Helm command for upgrading is:

helm upgrade longhorn oci://dp.apps.rancher.io/charts/suse-storage \
  --namespace longhorn-system \
  --version <version> \ # Replace with the version you would like to upgrade to
  --set global.imagePullSecrets=<PULL_IMAGE_SECRET> \
  -f values.yaml

To create a secret, follow the AppCo documentation.

Or, if upgrading without a specific values.yaml file and only changing the version:

helm upgrade longhorn oci://dp.apps.rancher.io/charts/suse-storage \
  --namespace longhorn-system \
  --version <version> \ # Replace with the version you would like to upgrade to
  --set global.imagePullSecrets=<PULL_IMAGE_SECRET>
  • Upgrade Path: Refer to the official SUSE Storage upgrade documentation for specific version-to-version upgrade paths, prerequisites, and post-upgrade verification steps. This is important to ensure a smooth upgrade and data integrity.

  • Configuration Changes: If you have custom configurations, ensure you carry them over to the new chart version, merging with any default changes.

Upgrade with Fleet

Update the value of helm.version in the fleet YAML file of your GitOps repository.

helm:
  repo: https://charts.longhorn.io
  chart: longhorn
  version: v1.9.2 # Replace with the SUSE Storage version you would like to upgrade to
  releaseName: longhorn

Upgrade with Flux

Update the value of spec.chart.spec.version in the HelmRelease YAML file of your GitOps repository.

spec:
  chart:
    spec:
      chart: longhorn
      reconcileStrategy: ChartVersion
      sourceRef:
        kind: HelmRepository
        name: longhorn
      version: v1.9.2 # Replace with the SUSE Storage version you would like to upgrade to

Upgrade with Argo CD

Update the value of targetRevision in the Application YAML file of your GitOps repository.

spec:
  project: default
  sources:
    - chart: longhorn
      repoURL: https://charts.longhorn.io
      targetRevision: v1.9.2 # Replace with the SUSE Storage version you would like to upgrade to

Then wait for all the pods to become running and SUSE Storage UI working. For example:

 $ kubectl -n longhorn-system get pod
 NAME                                                  READY   STATUS    RESTARTS      AGE
 engine-image-ei-4dbdb778-nw88l                        1/1     Running   0             4m29s
 longhorn-ui-b7c844b49-jn5g6                           1/1     Running   0             75s
 longhorn-manager-z2p8h                                1/1     Running   0             71s
 instance-manager-b34d5db1fe1e2d52bcfb308be3166cfc     1/1     Running   0             65s
 longhorn-driver-deployer-6bd59c9f76-jp6pg             1/1     Running   0             75s
 engine-image-ei-df38d2e5-zccq5                        1/1     Running   0             65s
 csi-snapshotter-588457fcdf-h2lgc                      1/1     Running   0             30s
 csi-resizer-6d8cf5f99f-8v4sp                          1/1     Running   1 (30s ago)   37s
 csi-snapshotter-588457fcdf-6pgf4                      1/1     Running   0             30s
 csi-provisioner-869bdc4b79-7ddwd                      1/1     Running   1 (30s ago)   44s
 csi-snapshotter-588457fcdf-p4kkn                      1/1     Running   0             30s
 csi-attacher-7bf4b7f996-mfbdn                         1/1     Running   1 (30s ago)   50s
 csi-provisioner-869bdc4b79-4dc7n                      1/1     Running   1 (30s ago)   43s
 csi-resizer-6d8cf5f99f-vnspd                          1/1     Running   1 (30s ago)   37s
 csi-attacher-7bf4b7f996-hrs7w                         1/1     Running   1 (30s ago)   50s
 csi-attacher-7bf4b7f996-rt2s9                         1/1     Running   1 (30s ago)   50s
 csi-resizer-6d8cf5f99f-7vv89                          1/1     Running   1 (30s ago)   37s
 csi-provisioner-869bdc4b79-sn6zr                      1/1     Running   1 (30s ago)   43s
 longhorn-csi-plugin-b2zzj                             2/2     Running   0             24s