Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datamover restore fails if restore cluster is using velero installed in a different namespace than velero on the backup cluster. #8617

Closed
sseago opened this issue Jan 14, 2025 · 0 comments · Fixed by #8621
Assignees
Milestone

Comments

@sseago
Copy link
Collaborator

sseago commented Jan 14, 2025

What steps did you take and what happened:

  1. Velero is installed in 2 different namespaces (for example, velero and velero2) -- could be same cluster or separate clusters
  2. Deploy workload in a namespace (for example, mysql-test)
  3. Back up mysql-persistent using velero installed in velero using datamover with backup backup1.
  4. Delete namespace mysql-test
  5. Restore backup1 using velero installed in velero2

Volume restore failed with errors on the volumes similar to the following:

Errors:
  Velero:     <none>
  Cluster:    <none>
  Namespaces:
    mysql-test:  error preparing persistentvolumeclaims/mysql-test/mysql-data: rpc error: code = Unknown desc = fail get DataUploadResult for restore: restore1: no DataUpload result cm found with labels velero.io/pvc-namespace-name=mysql-test.mysql-data,velero.io/restore-uid=3ce81300-46c1-4806-902e-79fc6318a3f0,velero.io/resource-usage=DataUpload
                 error preparing persistentvolumeclaims/mysql-test/mysql-data1: rpc error: code = Unknown desc = fail get DataUploadResult for restore: restore1: no DataUpload result cm found with labels velero.io/pvc-namespace-name=mysql-test.mysql-data1,velero.io/restore-uid=3ce81300-46c1-4806-902e-79fc6318a3f0,velero.io/resource-usage=DataUpload

What did you expect to happen:
Workload mysql-persistent to be restored properly.

Anything else you would like to add:

When Velero restores a datamover backup, the DataUpload and related ConfigMaps are restored from backup to the velero namespace. If the currently-running velero is installed in a different namespace, these CRs will not be restored to the right location. The velero restore logic needs to make an exception for DataUploads and related CRs and restore those to the currnet namespace and not the namespace from backup.

I will work on a PR for this.

Environment:

  • Velero version (use velero version): 1.14.0
  • Velero features (use velero client config get features):
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants