# Rollback Guide: From SMCP 5.12 to SMCP 5.11

## Prerequisites

* Backup of the SMCP 5.12 management plane
* Access to SMCP 5.11 artifacts

## Rollback Procedure

### 1. Backup SMCP 5.12 Management Plane(Optional)

Follow the Backup Guide to create a backup of the current SMCP 5.12 management plane.

####

### 2. Download and Install SMCP 5.11 Artifacts

Download the SMCP 5.11 artifacts and install them:

{% tabs %}
{% tab title="None" %}

```none
wget https://raw.githubusercontent.com/platform9/support-locker/master/edge-stack/download.sh 
#Download script

chmod u+x download.sh 
# change permission

./download.sh <PF9-SHARED-SECRET> v-5.11.1-3501826
# Download artifacts 

bash install.sh v-5.11.1-3501826
# Install artifacts
```

{% endtab %}
{% endtabs %}

### 3. Configure SMCP 5.11 Management Cluster

Update configuration files before deployment:

1. Edit `airctl-config.yaml`:
   * Update `airctlBuildNumber` to match the SMCP 5.9 version
2. Edit `nodelet-bootstrap.yaml`:
   * Update `systemImages` to use SMCP 5.11 image files
   * Set `userImages` to point to SMCP 5.12 image files
   * Add `isAirgapped: true` for offline installations

Example `nodelet-bootstrap.yaml` snippet:

{% tabs %}
{% tab title="None" %}

```none
isAirgapped: true
systemImages:
- /opt/pf9/airctl/imgs/kubedu-imgs-v-5.11.1-3501826.tar.gz
- /opt/pf9/airctl/imgs/nodelet-imgs-v-5.11.1-3501826.tar.gz
userImages:
- /opt/pf9/airctl/imgs/kubedu-imgs-v-5.12.1-3802903.tar.gz
```

{% endtab %}
{% endtabs %}

### 4. Use upgrade-mgmt to SMCP 5.11 Management Cluster

{% tabs %}
{% tab title="None" %}

```none
airctl advanced-ddu upgrade-mgmt
```

{% endtab %}
{% endtabs %}

####

### 5. Verify DU Status

Check that the DU is in a ready state:

{% tabs %}
{% tab title="None" %}

```none
airctl status
```

{% endtab %}
{% endtabs %}

Wait until all components show as ready before proceeding.

### 6. Upgrade DU Components (Optional)

If needed, follow the SMCP 5.11 upgrade guide to update the DU components.

### 7. Verify Rollback in GUI

Log in to the management UI and confirm the version is displayed as 5.11.

### 8. Push Required Kubernetes Images

Push images for the supported Kubernetes versions (1.28, 1.29, 1.30) to your private registry (if applicable):

{% tabs %}
{% tab title="None" %}

```none
sudo airctl advanced-du push-images --img-tar [tar file name]
```

{% endtab %}
{% endtabs %}

To push all new images at once:

{% tabs %}
{% tab title="None" %}

```none
ls -1 /opt/pf9/airctl/imgs/k8s* | xargs -I{} sh -c "sudo /opt/pf9/airctl/airctl --config /opt/pf9/airctl/conf/airctl-config.yaml advanced-du push-images --img-tar {}"
```

{% endtab %}
{% endtabs %}

### 9. Upgrade Host Components

Upgrade the host-side components to SMCP 5.11:

{% tabs %}
{% tab title="None" %}

```none
airctl configure-hosts --reset-pf9-managed-docker-conf --skip-docker-install --skip-docker-img-import --verbose airctl hosts-status airctl upgrade-hosts --verbose
```

{% endtab %}
{% endtabs %}

### 10. Verify Status and Version

After the rollback, confirm the management plane is in a ready state:

{% tabs %}
{% tab title="None" %}

```none
airctl status
# Check the status of management plane

airctl version
# The output should be: v-5.11.1-3501826

kubectl get nodes -o wide
# Ensure all the nodes are in Ready state
```

{% endtab %}
{% endtabs %}
