Skip to content

Retain volumesnapshot-being-created annotation until readyToUse=true #1283

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pwschuurman
Copy link
Contributor

What type of PR is this?
/kind bug

What this PR does / why we need it:
In createSnapshotWrapper(), the snapshot.storage.kubernetes.io/volumesnapshot-being-created annotation is removed even if the snapshot is not marked as readyToUse true. This is inconsistent with the same logic in syncContent() where we only remove the annotation if the snapshot content is ready:

_, err = ctrl.removeAnnVolumeSnapshotBeingCreated(content)

Which issue(s) this PR fixes:

This change may reduce symptoms seen in #1282. However this does not fix the root cause of immedate vs. scheduled exponential backoff requeuing.

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Remove VolumeSnapshotContent ``snapshot.storage.kubernetes.io/volumesnapshot-being-created annotation only when status.readyToUse is true

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 21, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pwschuurman
Once this PR has been reviewed and has the lgtm label, please assign jsafrane for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 21, 2025
@pwschuurman
Copy link
Contributor Author

/assign @sunnylovestiramisu

@nixpanic
Copy link
Member

/lgtm

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 23, 2025
@nixpanic nixpanic removed their assignment Apr 23, 2025
@pwschuurman pwschuurman force-pushed the retain-snapshot-creating-annotation branch from 04ad286 to ad35797 Compare May 27, 2025 21:46
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2025
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

content, err = ctrl.removeAnnVolumeSnapshotBeingCreated(content)
if err != nil {
return content, fmt.Errorf("failed to remove VolumeSnapshotBeingCreated annotation on the content %s: %q", content.Name, err)
if contentIsReady(content) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

As described in the comments, the annotation is only needed before the snapshot is cut on the storage system. After the snapshot is cut, a snapshot id will be returned and can be used to identify the snapshot on the storage system (if user chooses to delete the snapshot).
I don't see why we have to wait until the snapshot is post processed and ready to use set to true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants