Skip to content

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.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 26, 2025
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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. 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.

6 participants