Skip to content

Post-restore hook for a pod that is managed by a deployment resource is not executed during restore #103

@auhl-ibm

Description

@auhl-ibm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationkind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions