Repository navigation
NetApp: create CS volume and template from CS volume snapshot - #14517
rajiv-jain-netapp wants to merge 5 commits into
Conversation
Enable the managed-storage template cache flow for the ONTAP primary storage plugin so that VM root volumes are cloned from a template copy kept on the pool's FlexVolume instead of being copied from secondary storage for every deployment. - Advertise CAN_CREATE_VOLUME_FROM_VOLUME from the datastore driver. - Create the template cache on primary: an iSCSI LUN (identity tracked on template_spool_ref) or a qcow2 file for NFS, populated by the KVM host. - Clone new volumes from the cached template: LUN clone for iSCSI and ONTAP file clone (FileCloneRequest) for NFS, growing the clone when the disk offering is larger than the template. - Clean up the cached LUN/file when the template is removed from the pool; a missing file is treated as already deleted. - Move protocol-specific create/clone/resize logic into UnifiedSANStrategy and UnifiedNASStrategy, and add a StorageStrategy helper to poll an optional async job. - Add unit tests for the driver and the NAS/SAN strategies.
Stack the snapshot-clone paths onto the ONTAP template-cache branch so a volume or template can be created from a CloudStack volume snapshot that already lives on the same primary pool. - Clone a data volume from a snapshot on the same FlexVolume (iSCSI LUN clone or NFS file clone). A root snapshot still produces a data volume; the bootable path is create-template-from-snapshot. - Copy a snapshot into a temporary volume when creating a template, then remove that temporary volume record after the copy. - Grow the clone when the disk offering is larger than the snapshot, and delete the orphaned clone if resize fails. - Keep template-cache behavior for clone-from-template, including the existing pool types (Iscsi and NetworkFilesystem) on this branch. Co-authored-by: Cursor <cursoragent@cursor.com>
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #14517 +/- ##
=============================================
- Coverage 20.75% 3.88% -16.88%
=============================================
Files 6496 493 -6003
Lines 591602 42571 -549031
Branches 72583 8069 -64514
=============================================
- Hits 122814 1653 -121161
+ Misses 455456 40687 -414769
+ Partials 13332 231 -13101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 19936 |
This PR...
Behaviour:
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):