# Upgrading on RHOSP

## 1] Prerequisites

Please ensure the following requirements are met before starting the upgrade process:

* No Snapshot or Restore is running
* Global job scheduler is disabled
* Disable the wlm services on all controller nodes

```
sudo systemctl stop tripleo_triliovault_wlm_api.service
sudo systemctl disable tripleo_triliovault_wlm_api.service
sudo systemctl stop tripleo_triliovault_wlm_scheduler.service
sudo systemctl disable tripleo_triliovault_wlm_scheduler.service
sudo systemctl stop tripleo_triliovault_wlm_workloads.service
sudo systemctl disable tripleo_triliovault_wlm_workloads.service
```

* Disable the datamover service on all compute nodes

```
sudo systemctl stop tripleo_triliovault_datamover.service
sudo systemctl disable tripleo_triliovault_datamover.service
sudo umount /var/lib/nova/triliovault-mounts
```

## 2] Install latest Trilio release

Take a backup of existing triliovault-cfg-scripts directory

```
cd /home/stack
mv triliovault-cfg-scripts/ triliovault-cfg-scripts-5.x
```

Clone triliovault-cfg-scripts github repository of latest release.

```
git clone -b {{ trilio_branch }} https://github.com/trilioData/triliovault-cfg-scripts.git
```

Copy the passwords and triliovault wlm ids files from old cfg-scripts directory.

```
cp /home/stack/triliovault-cfg-scripts-5.x/redhat-director-scripts/rhosp17/environments/passwords.yaml /home/stack/triliovault-cfg-scripts/redhat-director-scripts/rhosp17/environments/trilio_passwords.yaml
cp /home/stack/triliovault-cfg-scripts-5.x/redhat-director-scripts/rhosp17/puppet/trilio/files/triliovault_wlm_ids.conf /home/stack/triliovault-cfg-scripts/redhat-director-scripts/rhosp17/puppet/trilio/files/
```

Please follow [this documentation](../../../deployment/installing-on-rhosp#id-1.4-if-the-backup-target-type-is-ceph-based-s3-with-ssl) from section 1.4 to section 10. Please note that sections 5 and 6 needs to be skipped during this process.

While providing the backup target details in section 4.1, please ensure to provide the existing backup target (of 5.x release) as default.

## 3] Restart wlm-cron resource

From any one of the controller nodes, run the below command.

```
sudo pcs resource restart triliovault-wlm-cron-podman-0
```

## 4] Fetch backup target details

From any one of the controller nodes, login to wlm api container and run the below commands to fetch the backup target details.

```
sudo podman exec -it triliovault_wlm_api bash
source /etc/triliovault-wlm/cloud_admin_rc

workloadmgr backup-target-type-list
```

This command will return the backup\_target\_id and backup\_target\_type\_id.

## 5] Import workloads

From any one of the controller ndoes, login to wlm api container and run the below commands.

```
sudo podman exec -it triliovault_wlm_api bash
source /etc/triliovault-wlm/cloud_admin_rc

workloadmgr abandon-resource --all-workloads --all-policies --cloud-wide
workloadmgr workload-get-importworkloads-list --source-bt {{ backup_target_id }}
workloadmgr workload-importworkloads --source-btt {{ backup_target_type_id }}
```

## 6] Update backing file path

{% hint style="info" %}
This step would be needed only when your old backup target is S3.
{% endhint %}

Please follow [this documentation](../../advanced-configuration/switch-nfs-backing-file) to update the backing file path of existing snapshots.
