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

Skip the VolumeSnapshots and VolumeSnapshotContents not created by the backup. #8460

Open
blackpiglet opened this issue Nov 26, 2024 · 0 comments
Assignees
Labels
Area/CSI Related to Container Storage Interface support backlog

Comments

@blackpiglet
Copy link
Contributor

What steps did you take and what happened:

The original issue is #8444.
The backed-up namespace contains a VolumeSnapshot. The VolumeSnapshot is not in ReadyToUse phase. As a result, its corresponding VolumeSnapshotContent doesn't have the snapshot handle in its status.
Create a backup including the VolumeSnapshot's hosting namespace.

Restore the backup to another namespace.

The restore fails with errors:

Errors:
  Velero:     <none>
  Cluster:    <none>
  Namespaces:
    vaicloud-dev:  error preparing volumesnapshots.snapshot.storage.k8s.io/vaicloud-dev/cephfs-pvc-snapshot: rpc error: code = Unknown desc = VolumeSnapshot vaicloud-dev/cephfs-pvc-snapshot does not have a velero.io/csi-volumesnapshot-handle annotation

The reason is the CSI VolumeSnapshot RestoreItemAction expects the VolumeSnapshot should have a snapshot handle in its annotation:

snapHandle, exists := vs.Annotations[velerov1api.VolumeSnapshotHandleAnnotation]
if !exists {
return nil, errors.Errorf(
"VolumeSnapshot %s/%s does not have a %s annotation",
vs.Namespace,
vs.Name,
velerov1api.VolumeSnapshotHandleAnnotation,
)
}

What did you expect to happen:
The backup should not include the VolumeSnapshots not created by the backup itself.

The following information will help us better understand what's going on:

If you are using velero v1.7.0+:
Please use velero debug --backup <backupname> --restore <restorename> to generate the support bundle, and attach to this issue, more options please refer to velero debug --help

If you are using earlier versions:
Please provide the output of the following commands (Pasting long output into a GitHub gist or other pastebin is fine.)

  • kubectl logs deployment/velero -n velero
  • velero backup describe <backupname> or kubectl get backup/<backupname> -n velero -o yaml
  • velero backup logs <backupname>
  • velero restore describe <restorename> or kubectl get restore/<restorename> -n velero -o yaml
  • velero restore logs <restorename>

Anything else you would like to add:

Environment:

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

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
Labels
Area/CSI Related to Container Storage Interface support backlog
Projects
None yet
Development

No branches or pull requests

2 participants