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

Requeue un-ready volume snapshots #958

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

jsafrane
Copy link
Contributor

@jsafrane jsafrane commented Nov 10, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:
Requeue a VolumeSnapshotContent that is readyToUse: false with an exp. backoff. This will retry CreateSnapshot CSI call until the snapshot finally gets readyToUse: true.

Which issue(s) this PR fixes:

Fixes #953

Special notes for your reviewer:
I updated the existing unit tests in the first commit to be able to check when syncContent returns no error when an error was expected.

Does this PR introduce a user-facing change?:

Fixed waiting for a snapshot to become ready with exponential backoff in CSI Snapshotter sidecar.

@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. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 10, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 10, 2023
@jsafrane jsafrane force-pushed the fix-unready-requeue branch from ac102fc to 5d5ca97 Compare November 15, 2023 19:06
@xing-yang
Copy link
Collaborator

The Trivy error should be fixed by this PR. Please help merge it. Thanks.
#962

@jsafrane jsafrane force-pushed the fix-unready-requeue branch from 5d5ca97 to 3063863 Compare November 16, 2023 08:25
@jsafrane
Copy link
Contributor Author

/retest
trivy should be green now

@xing-yang
Copy link
Collaborator

I think you need to rebase.

Tests must fail when syncContent() returns success and error was expected.
SnapshotContents with readyToUse: false should be periodically requeued
with exp. backoff until the CSI driver confirms the snapshot is ready.
@jsafrane jsafrane force-pushed the fix-unready-requeue branch from 3063863 to 8a29bf5 Compare November 16, 2023 14:37
@jsafrane
Copy link
Contributor Author

Rebased

@xing-yang
Copy link
Collaborator

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 16, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsafrane, xing-yang

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

The pull request process is described 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 merged commit 5ca300e into kubernetes-csi:master Nov 16, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

external-snapshotter does not wait snapshot to get ready
3 participants