From 55a5d2cb438424ae22d5c7e4c5a966dd6f7b00b6 Mon Sep 17 00:00:00 2001 From: Billy Tat Date: Thu, 12 May 2022 12:32:10 -0700 Subject: [PATCH 1/3] Update back restore app steps --- .../en/backups/restoring-rancher/_index.md | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/content/rancher/v2.6/en/backups/restoring-rancher/_index.md b/content/rancher/v2.6/en/backups/restoring-rancher/_index.md index 468b179d348..cad6c716aa3 100644 --- a/content/rancher/v2.6/en/backups/restoring-rancher/_index.md +++ b/content/rancher/v2.6/en/backups/restoring-rancher/_index.md @@ -3,16 +3,7 @@ title: Restoring Rancher weight: 2 --- -A restore is performed by creating a Restore custom resource. - ---- -**Caution:** Before performing a restore or rollback, note the following: - -- In Rancher v2.6.4, the cluster-api module has been upgraded from v0.4.4 to v1.0.2 in which the apiVersion of CAPI CRDs are upgraded from `cluster.x-k8s.io/v1alpha4` to `cluster.x-k8s.io/v1beta1`. This has the effect of causing rollbacks from Rancher v2.6.4 to any previous version of Rancher v2.6.x to fail because the previous version the CRDs needed to roll back are no longer available in v1beta1. - -- To avoid this, the Rancher resource cleanup scripts should be run **before** the restore or rollback is attempted. Specifically, two scripts have been created to assist you: one to clean up the cluster (`cleanup.sh`), and one to check for any Rancher-related resources in the cluster (`verify.sh`). Details on the cleanup script can be found in the [rancherlabs/support-tools repo](https://github.com/rancherlabs/support-tools/tree/master/cleanup-rancher-k8s-resources). - ---- +A restore is performed by creating a Restore custom resource. > **Important** > @@ -22,6 +13,21 @@ A restore is performed by creating a Restore custom resource. ### Create the Restore Custom Resource +#### Additional Steps for Rollbacks with Rancher v2.6.4+ + +In Rancher v2.6.4, the cluster-api module has been upgraded from v0.4.4 to v1.0.2 in which the apiVersion of CAPI CRDs are upgraded from `cluster.x-k8s.io/v1alpha4` to `cluster.x-k8s.io/v1beta1`. This has the effect of causing rollbacks from Rancher v2.6.4 to any previous version of Rancher v2.6.x to fail because the previous version the CRDs needed to roll back are no longer available in v1beta1. + +To avoid this, the Rancher resource cleanup scripts should be run **before** the restore or rollback is attempted. Specifically, two scripts have been created to assist you: one to clean up the cluster (`cleanup.sh`), and one to check for any Rancher-related resources in the cluster (`verify.sh`). Details on the cleanup script can be found in the [rancherlabs/support-tools repo](https://github.com/rancherlabs/support-tools/tree/master/rancher-cleanup). + +The additional preparations: + +1. Follow these [instructions](https://github.com/rancherlabs/support-tools/blob/master/rancher-cleanup/README.md) to run the scripts. +1. Follow these [instructions](https://rancher.com/docs/rancher/v2.6/en/backups/migrating-rancher/) to install the rancher-backup Helm chart on the existing cluster and restore the previous state. + 1. Omit Step 3. + 1. When Step 4 is reached, install the required Rancher v2.6.x version on the local cluster you intend to roll back to + +#### Create the Restore Custom Resource + 1. In the upper left corner, click **☰ > Cluster Management**. 1. On the **Clusters** page, go to the `local` cluster and click **Explore**. The `local` cluster runs the Rancher server. 1. In the left navigation bar, click **Rancher Backups > Restores**. @@ -74,6 +80,6 @@ In some cases, after restoring the backup, Rancher logs will show errors similar ``` 2021/10/05 21:30:45 [ERROR] error syncing 'c-89d82/m-4067aa68dd78': handler rke-worker-upgrader: clusters.management.cattle.io "c-89d82" not found, requeuing ``` -This happens because one of the resources that was just restored has finalizers but the related resources have been deleted so the handler cannot find it. +This happens because one of the resources that was just restored has finalizers but the related resources have been deleted so the handler cannot find it. To eliminate the errors, we need to find and delete the resource that causes the error. See more information [here](https://github.com/rancher/rancher/issues/35050#issuecomment-937968556) From 3d3fe53fa6f06fd151b00bd448cef7dd5d690661 Mon Sep 17 00:00:00 2001 From: Billy Tat Date: Thu, 12 May 2022 13:14:48 -0700 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Jen Travinski --- content/rancher/v2.6/en/backups/restoring-rancher/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/rancher/v2.6/en/backups/restoring-rancher/_index.md b/content/rancher/v2.6/en/backups/restoring-rancher/_index.md index cad6c716aa3..644986371cd 100644 --- a/content/rancher/v2.6/en/backups/restoring-rancher/_index.md +++ b/content/rancher/v2.6/en/backups/restoring-rancher/_index.md @@ -24,7 +24,7 @@ The additional preparations: 1. Follow these [instructions](https://github.com/rancherlabs/support-tools/blob/master/rancher-cleanup/README.md) to run the scripts. 1. Follow these [instructions](https://rancher.com/docs/rancher/v2.6/en/backups/migrating-rancher/) to install the rancher-backup Helm chart on the existing cluster and restore the previous state. 1. Omit Step 3. - 1. When Step 4 is reached, install the required Rancher v2.6.x version on the local cluster you intend to roll back to + 1. When Step 4 is reached, install the required Rancher v2.6.x version on the local cluster you intend to roll back to. #### Create the Restore Custom Resource @@ -80,6 +80,6 @@ In some cases, after restoring the backup, Rancher logs will show errors similar ``` 2021/10/05 21:30:45 [ERROR] error syncing 'c-89d82/m-4067aa68dd78': handler rke-worker-upgrader: clusters.management.cattle.io "c-89d82" not found, requeuing ``` -This happens because one of the resources that was just restored has finalizers but the related resources have been deleted so the handler cannot find it. +This happens because one of the resources that was just restored has finalizers, but the related resources have been deleted so the handler cannot find it. To eliminate the errors, we need to find and delete the resource that causes the error. See more information [here](https://github.com/rancher/rancher/issues/35050#issuecomment-937968556) From 05de097afe6ba2a5eae6049457a45c32a78f4b5d Mon Sep 17 00:00:00 2001 From: Billy Tat Date: Thu, 12 May 2022 14:13:13 -0700 Subject: [PATCH 3/3] Apply feedback --- .../v2.6/en/backups/restoring-rancher/_index.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/content/rancher/v2.6/en/backups/restoring-rancher/_index.md b/content/rancher/v2.6/en/backups/restoring-rancher/_index.md index 644986371cd..2ec7691aa79 100644 --- a/content/rancher/v2.6/en/backups/restoring-rancher/_index.md +++ b/content/rancher/v2.6/en/backups/restoring-rancher/_index.md @@ -3,7 +3,7 @@ title: Restoring Rancher weight: 2 --- -A restore is performed by creating a Restore custom resource. +This page outlines how to perform a restore with Rancher. > **Important** > @@ -11,14 +11,14 @@ A restore is performed by creating a Restore custom resource. > * While restoring rancher on the same setup, the operator will scale down the rancher deployment when restore starts, and it will scale back up the deployment once restore completes. So Rancher will be unavailable during the restore. > * If you need to restore Rancher to a previous version after an upgrade, see the [rollback documentation.]({{}}/rancher/v2.6/en/installation/install-rancher-on-k8s/rollbacks/) -### Create the Restore Custom Resource - -#### Additional Steps for Rollbacks with Rancher v2.6.4+ +### Additional Steps for Rollbacks with Rancher v2.6.4+ In Rancher v2.6.4, the cluster-api module has been upgraded from v0.4.4 to v1.0.2 in which the apiVersion of CAPI CRDs are upgraded from `cluster.x-k8s.io/v1alpha4` to `cluster.x-k8s.io/v1beta1`. This has the effect of causing rollbacks from Rancher v2.6.4 to any previous version of Rancher v2.6.x to fail because the previous version the CRDs needed to roll back are no longer available in v1beta1. To avoid this, the Rancher resource cleanup scripts should be run **before** the restore or rollback is attempted. Specifically, two scripts have been created to assist you: one to clean up the cluster (`cleanup.sh`), and one to check for any Rancher-related resources in the cluster (`verify.sh`). Details on the cleanup script can be found in the [rancherlabs/support-tools repo](https://github.com/rancherlabs/support-tools/tree/master/rancher-cleanup). +> **Caution** Rancher will be down as the `cleanup` script runs as it deletes the resources created by rancher. + The additional preparations: 1. Follow these [instructions](https://github.com/rancherlabs/support-tools/blob/master/rancher-cleanup/README.md) to run the scripts. @@ -26,7 +26,9 @@ The additional preparations: 1. Omit Step 3. 1. When Step 4 is reached, install the required Rancher v2.6.x version on the local cluster you intend to roll back to. -#### Create the Restore Custom Resource +### Create the Restore Custom Resource + +A restore is performed by creating a Restore custom resource. 1. In the upper left corner, click **☰ > Cluster Management**. 1. On the **Clusters** page, go to the `local` cluster and click **Explore**. The `local` cluster runs the Rancher server.