Skip to content

ONTAP: cache templates on primary storage and clone volumes from them - #14243

Open
rajiv-jain-netapp wants to merge 1 commit into
apache:mainfrom
NetApp:ontap-template-cache
Open

rajiv-jain-netapp wants to merge 1 commit into
apache:mainfrom
NetApp:ontap-template-cache

Conversation

@rajiv-jain-netapp

@rajiv-jain-netapp rajiv-jain-netapp commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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.

Description

This PR...

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  1. Junit tests are incorporated.
  2. Additional we tested by running the feature for
    1. create VM for the first time for a given template and storage-pool, workflow created a template and VM subsequently
    2. On create of another VM in sequence with the same template and storage-pool, we are finding VM instance created is pretty fast since it used local template cache.
    3. We tested the workflows for both iSCSI and NFS3 protocol.

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.
@rajiv-jain-netapp

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@rajiv-jain-netapp

Copy link
Copy Markdown
Contributor Author

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant