Hi,
I have defined a post-restore hook for a pod that is managed by a deployment resource. The OCP plugin is hitting the restore plugin for pods and finding it has an owner reference, then skips the restore of the pod to allow the deployment to recreate the pod automatically to avoid duplicate pods.
When looking in the Velero restore log I can see that the restore of the pod was skipped:
time="2021-05-07T15:46:45Z" level=info msg="[pod-restore] skipping restore of pod my-mongodb-58dddc5999-p8zzl, has owner references and no restic backup" cmd=/plugins/velero-plugins logSource="/go/src/github.com/konveyor/openshift-velero-plugin/velero-plugins/pod/restore.go:51" pluginName=velero-plugins restore=velero/restore-k8s-53aadfc4-842e-49be-abf9-86e81e8f0c6f
time="2021-05-07T15:46:45Z" level=info msg="Skipping restore of Pod: my-mongodb-58dddc5999-p8zzl because a registered plugin discarded it" logSource="pkg/restore/restore.go:1074" restore=velero/restore-k8s-53aadfc4-842e-49be-abf9-86e81e8f0c6f
While this is probably expected behavior of the current OCP plugin to avoid duplicate pods, it causes the post-restore hook concept of Velero to be unusable in OCP environments where most of the pods have owner references. So I believe this is a bug.
I can upload more logs and more information if needed.
Thanks
Andreas
Hi,
I have defined a post-restore hook for a pod that is managed by a deployment resource. The OCP plugin is hitting the restore plugin for pods and finding it has an owner reference, then skips the restore of the pod to allow the deployment to recreate the pod automatically to avoid duplicate pods.
When looking in the Velero restore log I can see that the restore of the pod was skipped:
While this is probably expected behavior of the current OCP plugin to avoid duplicate pods, it causes the post-restore hook concept of Velero to be unusable in OCP environments where most of the pods have owner references. So I believe this is a bug.
I can upload more logs and more information if needed.
Thanks
Andreas