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

Use writable snapshot when cloning from PVC or snapshot #349

Closed
wants to merge 20 commits into from

Conversation

donatwork
Copy link
Contributor

@donatwork donatwork commented Feb 18, 2025

Description

Currently waiting for unit test coverage to increase before submitting PR but please review...

This PR solves the issue where cloning of large active source volumes are taking a long time. This may cause timeouts in some use cases. The cause of the timeout is due to the current process of cloning where a copy operation is used to copy from the source location to the destination. This is a slow operation.

The solution is to use snapshots to get a point in time copy, which is more consistent that copying an active volume, and then create a writable snapshot of the first snapshot. In this way the cloning operation can be reduced from minutes, hours perhaps, to seconds.

Some changes were made to CreateVolume and DeleteVolume to deal with writable snapshots.

 

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1763

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

Ran the following test cases:

Test Case Info Status Comments
create new pvc PASS
delete standalone pvc PASS
create clone of pvc PASS
delete clone of pvc PASS
delete source while cloned clone should remain PASS
create two clones of source PASS
delete one of two clones validate correct clone deleted PASS
create clone of clone should fail gracefully? PASS? pvc in pending, unsupported operation in logs
create snapshot while source is cloned PASS
create RO clone of snapshot PASS
create RW clone of snapshot PASS
delete clones of source pvc validate correct clones deleted PASS
delete source pvc while snapshots exist should fail gracefully PASS
delete RW clone of snapshot PASS
delete RO clone of snapshot PASS

@donatwork
Copy link
Contributor Author

Withdrawing PR until decision is made on the solution.

@donatwork donatwork closed this Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants