Skip to content

CloudStack Volume support with ONTAP storage#13053

Open
rajiv-jain-netapp wants to merge 93 commits intoapache:mainfrom
NetApp:sync/apache-main-apr-2026
Open

CloudStack Volume support with ONTAP storage#13053
rajiv-jain-netapp wants to merge 93 commits intoapache:mainfrom
NetApp:sync/apache-main-apr-2026

Conversation

@rajiv-jain-netapp
Copy link
Copy Markdown

@rajiv-jain-netapp rajiv-jain-netapp commented Apr 22, 2026

Description

Co-authored-by: Sandeep Locharla sandeep.locharla@netapp.com
Co-authored-by: Piyush Srivastava piyush5@netapp.com
Co-authored-by: Surya Gupta suryag@netapp.com

This PR...

  1. Supports cloudstack-volume usecases support for NFS3 and iSCSI protocols.
  2. Support for cloudStack-volume create/delete/attach/detach/snapshot-create.
  3. Instance create/delete/snapshot-create support
  4. Snapshot-create would not support
    1. memory snapshot
    2. user input for quicing option during snapshot creation

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?

Testing Done:

  1. VM create
Screenshot 2026-04-21 at 8 23 41 PM
  1. Validate the respective CloudStack volume
Screenshot 2026-04-21 at 8 24 08 PM
  1. Storage view for the cloudStack volumes
Screenshot 2026-04-21 at 8 32 03 PM
  1. VM snapshot support
Screenshot 2026-04-21 at 8 34 48 PM
  1. Storage view, post snapshot create
Screenshot 2026-04-21 at 8 35 16 PM
  1. CloudStack UI list view for snapshot
Screenshot 2026-04-21 at 8 35 47 PM
  1. CloudStack volume snapshot support
Screenshot 2026-04-21 at 8 36 34 PM
  1. Storage view, post snapshot create
Screenshot 2026-04-21 at 8 37 09 PM
  1. CloudStack UI list view for snapshot
Screenshot 2026-04-21 at 8 43 32 PM

How did you try to break this feature and the system with this change?

Jain, Rajiv and others added 30 commits October 3, 2025 14:02
… added EOF fixes + correcting license header
Initial primary storage pool plugin skeleton
Feignconfiguration and volume feignClient along with desired POJOs with cstack 28
* CSTACKEX-29 Cluster, SVM and Aggr Feign Client

* CSTACKEX-29 Change the endpoint method name in feign client

* CSTACKEX-29 Make the alignment proper

* CSTACKEX-29 Added License Info

* CSTACKEX-29 Resolve Review Comments

* CSTACKEX-29 Remove Component Annotation from datastoredriverclass

* CSTACKEX-29 Resolve Style check issues

* CSTACKEX-29 Resolve ALL Style issues

* CSTACKEX-29 Resolve Precommits Issues

* CSTACKEX-29 Added Method comments and change the ontap response class name

---------

Co-authored-by: Gupta, Surya <Surya.Gupta@netapp.com>
* CSTACKEX-31 NAS and Job Feign Client and POJOs

* CSTACKEX-31 Fixed Checks Issues

* CSTACKEX-31 Resolve Review Comments

* CSTACKEX-31 Resolve Review Comments

* CSTACKEX-31 Resolve Review Comments

* CSTACKEX-31 Added Aggr and size to volume model

* CSTACKEX-31 Change the export policy endpoint path

* CSTACKEX-31 Fixed check styles

---------

Co-authored-by: Gupta, Surya <Surya.Gupta@netapp.com>
* CSTACKEX-30 SAN Feign Client

* CSTACKEX-30 Fixed check style issues

* CSTACKEX-30 Fixed review comments

---------

Co-authored-by: Gupta, Surya <Surya.Gupta@netapp.com>
* CSTACKEX-7: ONTAP Primary storage pool

---------

Co-authored-by: Locharla, Sandeep <Sandeep.Locharla@netapp.com>
CSTACKEX-34: Upgrade to framework classes design
* CSTACKEX-35 Create Async

* CSTACKEX-35 Added Null and empty check

* CSTACKEX-35 Resolved review comments

* CSTACKEX-35 Removed Type Casting for logger

---------

Co-authored-by: Gupta, Surya <Surya.Gupta@netapp.com>
* CSTACKEX-1: Feign changes and fixes for getting storage pool creation to work

* CSTACKEX-01: Create Primary Storage pool changes with working code

* CSTACKEX-01: Addressed all review comments and updated some code

* CSTACKEX-01: Made some changes to fix some errors seen during testing

* CSTACKEX-01: Addressed additional comments

---------

Co-authored-by: Locharla, Sandeep <Sandeep.Locharla@netapp.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds NetApp ONTAP as a managed primary storage provider, including UI wiring for pool creation and backend support for CloudStack volume workflows over NFS3 and iSCSI, plus VM/volume snapshot integration for KVM.

Changes:

  • UI: adds NetApp ONTAP provider inputs (IP/username/password/SVM/protocol) and provider-specific parameter mapping.
  • Backend: introduces ONTAP storage strategies (NAS/SAN), lifecycle attach/delete behavior, and Feign clients/models for snapshot + file/LUN restore workflows.
  • KVM/engine: adjusts iSCSI handling and VM snapshot behavior to integrate ONTAP-specific snapshot strategy/limitations.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
ui/src/views/infra/zone/ZoneWizardLaunchZone.vue Adds NetApp ONTAP provider handling + details mapping during zone wizard primary storage creation
ui/src/views/infra/zone/ZoneWizardAddResources.vue Adds ONTAP-specific form fields and protocol choices in zone wizard
ui/src/views/infra/zone/StaticInputsForm.vue Adds numeric-format validation helper used by static forms
ui/src/views/infra/AddPrimaryStorage.vue Adds ONTAP provider form fields, validation rules, and API param mapping
ui/public/locales/en.json Adds English i18n strings for ONTAP fields/tooltips
server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java Adds ONTAP-specific error message when memory snapshots requested without a suitable strategy
plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedNASStrategyTest.java Adds unit tests for UnifiedNASStrategy behaviors
plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/StorageStrategyTest.java Adds unit tests for StorageStrategy connect/volume/network methods
plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycleTest.java Extends lifecycle tests for init/attach cluster/zone flows
plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriverTest.java Adds driver tests for create/delete/grant/revoke access flows
plugins/storage/volume/ontap/src/main/resources/META-INF/cloudstack/storage-volume-ontap/spring-storage-volume-ontap-context.xml Registers ONTAP VM snapshot strategy bean
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/OntapStorageUtils.java Adds ONTAP helpers for auth headers, naming, and protocol-specific volume request building
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/OntapStorageConstants.java Updates provider naming and adds constants for snapshot/mount options
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/CloudStackVolume.java Extends request/response model to support snapshot workflows (flexvol UUID, destination path)
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/AccessGroup.java Refactors access-group request to use storagePoolId instead of PrimaryDataStoreInfo
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java Implements iSCSI LUN CRUD, igroup management, LUN mapping helpers, and snapshot revert via CLI API
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedNASStrategy.java Implements NFS volume handling via host commands + export policy management + snapshot revert via CLI API
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java Centralizes Feign client creation and adds snapshot job polling + snapshot feign accessors
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/SANStrategy.java Adds SAN helper contract for ensuring LUN mappings and initiator validation
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/provider/StorageProviderFactory.java Selects unified NAS/SAN strategy by protocol and injects components
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/listener/OntapHostListener.java Passes pool details to agent on host connect and updates pool host refs/capacity
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java Refactors initialization inputs, forces NFSv3 mount options, and adds attach/delete logic updates
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/VolumeConcise.java Adds concise Volume model used by snapshot responses
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/SnapshotFileRestoreRequest.java Adds request model for snapshot file restore API
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/OntapStorage.java Refactors ONTAP connection model to use storageIP and removes disaggregated flag
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/LunRestoreRequest.java Adds request model for LUN restore API
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/FlexVolSnapshot.java Adds model for FlexVolume-level snapshots
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/FileInfo.java Adjusts file model fields for NAS operations
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/FileClone.java Adds request model for ONTAP file clone
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/CliSnapshotRestoreRequest.java Adds CLI passthrough restore-file request model
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/client/SnapshotFeignClient.java Adds Feign client for FlexVol snapshot and restore APIs (including CLI passthrough)
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/client/SANFeignClient.java Adds Feign method for LUN restore
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/client/NASFeignClient.java Updates file GET to include metadata and adds file clone endpoint
plugins/storage/volume/ontap/pom.xml Adds dependencies and surefire argLine for tests
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/IscsiAdmStorageAdaptor.java Makes iSCSI login/create idempotent, rescans sessions, avoids logging out when other LUNs exist, adds flush/sync
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtCreateDiskOnlyVMSnapshotCommandWrapper.java Improves error handling and consolidates cleanup logic for snapshot deltas
engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java Updates managed template copy flow to use iSCSI/LUN info available post-grantAccess for ONTAP
engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java Excludes ONTAP managed pools from the generic KVM file-based VM snapshot strategy and improves failure messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/storage/volume/ontap/pom.xml Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 0% with 1627 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.95%. Comparing base (ed575cc) to head (c6e222b).
⚠️ Report is 97 commits behind head on main.

Files with missing lines Patch % Lines
...ck/storage/driver/OntapPrimaryDatastoreDriver.java 0.00% 421 Missing ⚠️
...ck/storage/vmsnapshot/OntapVMSnapshotStrategy.java 0.00% 395 Missing ⚠️
...cloudstack/storage/service/UnifiedSANStrategy.java 0.00% 261 Missing ⚠️
...cloudstack/storage/service/UnifiedNASStrategy.java 0.00% 179 Missing ⚠️
...hypervisor/kvm/storage/IscsiAdmStorageAdaptor.java 0.00% 91 Missing ⚠️
...rage/lifecycle/OntapPrimaryDatastoreLifecycle.java 0.00% 53 Missing ⚠️
...he/cloudstack/storage/utils/OntapStorageUtils.java 0.00% 44 Missing ⚠️
...udstack/storage/feign/model/LunRestoreRequest.java 0.00% 28 Missing ⚠️
...loudstack/storage/feign/model/FlexVolSnapshot.java 0.00% 25 Missing ⚠️
...LibvirtCreateDiskOnlyVMSnapshotCommandWrapper.java 0.00% 24 Missing ⚠️
... and 13 more
Additional details and impacted files
@@             Coverage Diff             @@
##               main   #13053     +/-   ##
===========================================
  Coverage     17.95%   17.95%             
- Complexity    16503    16578     +75     
===========================================
  Files          6019     6035     +16     
  Lines        540748   542707   +1959     
  Branches      66255    66643    +388     
===========================================
+ Hits          97084    97454    +370     
- Misses       432723   434256   +1533     
- Partials      10941    10997     +56     
Flag Coverage Δ
uitests 3.52% <ø> (-0.02%) ⬇️
unittests 19.11% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@winterhazel winterhazel added this to the 4.23.0 milestone Apr 22, 2026
@rajiv-jain-netapp
Copy link
Copy Markdown
Author

@DaanHoogland @winterhazel , How can we re-trigger the build?

@winterhazel
Copy link
Copy Markdown
Member

winterhazel commented Apr 27, 2026

@DaanHoogland @winterhazel , How can we re-trigger the build?

@rajiv-jain-netapp you can ping @blueorangutan and use the package command, like this:

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@winterhazel 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.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17610

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-15969)

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.

8 participants