openebs-docs
openebs-docs copied to clipboard
Unable to take a backup of a sample wordpress app using restic in RancherOS with OpenEBS
This issue is reported by imran in one of the opensource slack channel. While taking backup I am getting the following error
time="2019-04-03T08:57:22Z" level=info msg="Backup completed with errors: [pod volume backup failed: error getting volume path on host: expected one matching path, got 0, pod volume backup failed: error getting volume path on host: expected one matching path, got 0]" backup=velero/wp-bkp-openebs-1 logSource="pkg/backup/backup.go:297"
k8s version - v1.13.5
velero version
Client:
Version: v0.11.0
Git commit: ab2fc65c02ecdcb9bb1690e3afe67a3b3196aebc
Server:
Version: v0.11.0
After debugging this issue, found that the restic pods are not seeing any pod related directories under the /host_pods
mount. Its with the setting of the Restic daemonset for Rancher OS.
In RancherOS , the path is not /var/lib/kubelet/pods
, rather it is /opt/rke/var/lib/kubelet/pods
For resolving this issue, need to change the hostpath from "/var/lib/kubelet/pods" to "/opt/rke/var/lib/kubelet/pods"
Example snippet:
volumes:
- name: cloud-credentials
secret:
secretName: cloud-credentials
- name: host-pods
hostPath:
path: /opt/rke/var/lib/kubelet/pods
- name: scratch