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

feat: use lease instead of image metadata for reference count #152

Closed
wants to merge 24 commits into from

Conversation

woehrl01
Copy link

@woehrl01 woehrl01 commented Feb 23, 2024

This PR is aiming to fix #151

It changes the implementation to use leases in containerd instead of labels to keep references to the snapshots.

This also has the benefit that the metadata does not need to be updated all the time. Which looks like to lead to timeouts on high churn clusters.

This adds a USE_LEASE_ONLY env flag for the testing phase which does not delete snapshots explictily, etc. This should be removed in the final version, including most of the sourcecode around that.

I opened the PR to get some feedback from you. Thanks!

@woehrl01
Copy link
Author

will reopen as soon as I have a fixed version

@woehrl01 woehrl01 closed this Feb 28, 2024
@woehrl01 woehrl01 reopened this Feb 29, 2024
@@ -47,6 +47,7 @@ func NewNodeServer(driver *csicommon.CSIDriver, mounter backend.Mounter, imageSv
SecretStore: secretStore,
Mounter: mounter,
}),
k8smounter: k8smount.New(""),
Copy link
Author

Choose a reason for hiding this comment

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

FYI. this is needed, so that the "unsafe mount" detection happens only once. It clutters the logs quite a bit

Copy link
Author

@woehrl01 woehrl01 Feb 29, 2024

Choose a reason for hiding this comment

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

This is based on the "general" mounter, but was needed because for leases some different behaviour is required. If you are fine with this PR in general, I would refactor that so that there are two distinct mounters, which suites it purpose best.

Copy link

github-actions bot commented Apr 3, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Apr 3, 2024
Copy link

Closing this PR after a prolonged period of inactivity. Please create a new PR if the changes of the PR are still relevant.

@github-actions github-actions bot closed this Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Volumes are suddenly empty
1 participant