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

Need to add SourceVolumeMode in restore when VSC doesn't have that value #7522

Closed
blackpiglet opened this issue Mar 14, 2024 · 2 comments
Closed
Assignees
Labels
Candidate for close Issues that should be closed and need a team review before closing has-e2e-tests
Milestone

Comments

@blackpiglet
Copy link
Contributor

blackpiglet commented Mar 14, 2024

What steps did you take and what happened:

This issue is related to #7433.
After #7433's related PR, the backup and restore with the external-snapshotter version no older than v0.7.0.
If the CSI-related backup is created with the external-snapshotter version older than v0.7.0, and restoring the backup into the k8s environment version no older than v0.7.0, then the restore should still fail with VolumeSnapshotContent not valid.

What did you expect to happen:

The Velero CSI plugin should modify the VolumeSnapshotContetent in RIA.
If the VolumeSnapshotContent's Spec.SourceVolumeMode is nil, the CSI plugin should set the value to Filesystem.

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):
  • 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"
@blackpiglet blackpiglet self-assigned this Mar 14, 2024
@Lyndon-Li Lyndon-Li added this to the v1.14 milestone Mar 15, 2024
@blackpiglet
Copy link
Contributor Author

blackpiglet commented Mar 15, 2024

I thought the SourceVolumeMode was required after the external-snapshotter version was upgraded to v7.0.1. #7433

After checking the external-snapshotter code, I found there was no need to add the SourceVolumeMode in the VolumeSnapshotContent.

The external-snapshotter webhook never checks the SourceVolumeMode's value for creating the VolumeSnapshotContent.

https://github.com/kubernetes-csi/external-snapshotter/blob/fcf78d3d6964632ed7f8b85aa045d667b1da47d4/pkg/validation-webhook/snapshot.go#L142-L163

For the VolumeSnapshotContent's update case, the webhook can also accept the empty SourceVolumeMode.

https://github.com/kubernetes-csi/external-snapshotter/blob/fcf78d3d6964632ed7f8b85aa045d667b1da47d4/pkg/validation-webhook/snapshot.go#L248-L256

@blackpiglet blackpiglet added the Candidate for close Issues that should be closed and need a team review before closing label Mar 15, 2024
@danfengliu
Copy link
Contributor

Nightly test of migration from v1.13 to 1.14 will cover this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Candidate for close Issues that should be closed and need a team review before closing has-e2e-tests
Projects
None yet
Development

No branches or pull requests

3 participants