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

Add Restore err in Finalizing PV Patch phase if SC VolumeBindingMode is WaitForFirstConsumer #7869

Conversation

shubham-pampattiwar
Copy link
Collaborator

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #7866

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

…is WaitForFirstConsumer

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

add changelog and fix CI error

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 10 lines in your changes missing coverage. Please review.

Project coverage is 58.78%. Comparing base (8b049a5) to head (d38c953).

Files Patch % Lines
pkg/controller/restore_finalizer_controller.go 16.66% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7869      +/-   ##
==========================================
- Coverage   58.80%   58.78%   -0.03%     
==========================================
  Files         345      345              
  Lines       28759    28769      +10     
==========================================
  Hits        16911    16911              
- Misses      10420    10429       +9     
- Partials     1428     1429       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@weshayutin
Copy link
Contributor

Thanks Shubham!

}
if *sc.VolumeBindingMode == storagev1api.VolumeBindingWaitForFirstConsumer {
ctx.logger.WithError(err).Errorf("StorageClass %s used by PV %s has VolumeBindingMode as WaitForFirstConsumer, you may need to be change it to Immediate if pods are excluded from backup", scName, pv.Name)
errs.Add(restoredNamespace, fmt.Errorf("StorageClass %s used by PV %s has VolumeBindingMode as WaitForFirstConsumer, you may need to be change it to Immediate if pods are excluded from backup", scName, pv.Name))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not always possible or desirable to change the binding mode of a storage class. Consider local storage which really needs WFFC in order to function correctly. I think it's quite important to ensure that velero works with WaitForFirstConsumer storage.

@shubham-pampattiwar
Copy link
Collaborator Author

Closing this PR in favor of #7953

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants