Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Unable to take a backup of a sample wordpress app using restic in RancherOS with OpenEBS #574

Open
ranjithwingrider opened this issue Apr 4, 2019 · 1 comment

Comments

@ranjithwingrider
Copy link
Contributor

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
@ranjithwingrider
Copy link
Contributor Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant