# 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](https://docs.trilio.io/openstack/upgrading-to-t4o-6.x-from-older-supported-versions/upgradetrilio/pages/NJDNSwFJX2PWkSXTyMad#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

To import workloads after upgrade, run the following command from any controller node by logging into the WLM API container:

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

```
workloadmgr workload-importworkloads --inplace-upgrade
```

Above `--inplace-upgrade` will update all the workload and policy records in database as per the current release version.

```
workloadmgr workload-get-importworkloads-list --source-bt {{ backup_target_id }}
```

The above command gives you the list of all the workloads that can be imported from the specified backup target.

```
workloadmgr workload-importworkloads --source-btt {{ backup_target_type_id }}
```

The above command imports all workloads from the specified backup target in the current cloud.

## 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](/openstack/advanced-configuration/switch-nfs-backing-file.md) to update the backing file path of existing snapshots.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trilio.io/openstack/upgrading-to-t4o-6.x-from-older-supported-versions/upgradetrilio/upgrading-on-rhosp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
