Skip to content

Introduction of Netapp Ontap iSCSI pool type - #14192

Open
piyush5netapp wants to merge 5 commits into
apache:mainfrom
NetApp:ontap-new-iscsi-pool-type
Open

piyush5netapp wants to merge 5 commits into
apache:mainfrom
NetApp:ontap-new-iscsi-pool-type

Conversation

@piyush5netapp

@piyush5netapp piyush5netapp commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR does covers below mentioned things

  1. Introduces the new pool type "OntapiSCSI" for Netapp ONTAP provider for iSCSI usecase.
  2. Introduction of new OntapIscsiStorageAdaptor for new pool type OntapiSCSI.
  3. Removed all the changes we did in common IscsiAdmStorageAdaptor for separation of concern and less blast radius.
  4. Enables vm snapshot UI icon for VM which is in Stopped state and disk is residing on OntapiSCSI pool.
  5. Ontap driver start claiming cross cluster and within cluster migration path.

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?

All the VM, volume workflows has been tested for Netapp ONTAP provider. Compute only migration of a Live VM has been tested.

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

@piyush5netapp
piyush5netapp marked this pull request as ready for review September 17, 2026 11:09
@winterhazel winterhazel added this to the 24.0 milestone Sep 19, 2026
@piyush5netapp

Copy link
Copy Markdown
Contributor Author

@winterhazel @weizhouapache I have raised this PR for the introduction of new iscsi pool type for Netapp ONTAP. I remember you guys were also of the same opinion for a new pool type for Netapp ONTAP as part of some previous PR.. Please have a look at this PR and share your feedback.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Existing pools can break after upgrade, unsupported format validation can orphan LUNs, and template creation still rejects RAW ONTAP iSCSI volumes.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 1 Medium severity

Open (3)
What changed in this PR

Adds OntapiSCSI as a first-class ONTAP iSCSI storage-pool type across management, KVM agent, and data-motion paths.

Changes:

  • Adds the new pool enum and lifecycle mapping.
  • Adds KVM adaptor and RAW image-format handling.
  • Extends validation and tests for ONTAP iSCSI behavior.
File Description
api/​src/​main/​java/​com/​cloud/​storage/​Storage.java Defines OntapiSCSI.
server/​src/​main/​java/​com/​cloud/​api/​ApiDBUtils.java Recognizes RAW ONTAP images.
plugins/​storage/​volume/​ontap/​src/​main/​java/​.../​OntapPrimaryDatastoreLifecycle.java Maps iSCSI pools to the new type.
plugins/​storage/​volume/​ontap/​src/​main/​java/​.../​OntapPrimaryDatastoreDriver.java Validates protocols and assigns formats.
plugins/​hypervisors/​kvm/​src/​main/​java/​.../​OntapIscsiStorageAdaptor.java Registers the KVM adaptor.
plugins/​hypervisors/​kvm/​src/​main/​java/​.../​KVMStorageProcessor.java Handles RAW ONTAP pools.
engine/​storage/​datamotion/​src/​main/​java/​.../​StorageSystemDataMotionStrategy.java Allows RAW ONTAP migration formats.
api/​src/​test/​java/​com/​cloud/​storage/​StorageTest.java Tests pool capabilities.
plugins/​storage/​volume/​ontap/​src/​test/​java/​.../​OntapPrimaryDatastoreLifecycleTest.java Tests pool initialization.
plugins/​storage/​volume/​ontap/​src/​test/​java/​.../​OntapPrimaryDatastoreDriverTest.java Tests format and validation behavior.
plugins/​hypervisors/​kvm/​src/​test/​java/​.../​OntapIscsiStorageAdaptorTest.java Tests adaptor discovery and RAW behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


volumeVO.setPoolType(storagePool.getPoolType());
volumeVO.setPoolId(storagePool.getId());
volumeVO.setFormat(getImageFormat(storagePool));
break;
case ISCSI:
parameters.setType(Storage.StoragePoolType.Iscsi);
parameters.setType(Storage.StoragePoolType.OntapiSCSI);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@weizhouapache I have already considered this migration path and I am ready with the sql command. I currently dont see the upgrade code from 4.23.0.0 to 4.24.0.0 . I have that code almost ready with me. One thing I want to confirm is about the format of new release version i.e 4.24.0.0 or 24.0.0. since filename will be named accordingly.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should the upgrade also fix the volumes on these pools? they keep the old pool type and still say qcow2, while new ones are raw

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, volumes on these pools as well pool both the field will be updated with the new value . I will tag you there once I raise the PR for the reviews.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the 24.0.0 upgrade file is on main now (schema-42300to2400.sql). can we add the pool and volume update here? if this merges first, existing pools cant create volumes after an upgrade

!(imageFormat == ImageFormat.RAW && (StoragePoolType.PowerFlex == poolType ||
StoragePoolType.FiberChannel == poolType))) {
throw new CloudRuntimeException(String.format("Only the following image types are currently supported: %s, %s, %s, %s (for PowerFlex and FiberChannel)",
StoragePoolType.FiberChannel == poolType || StoragePoolType.OntapiSCSI == poolType))) {
@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.92%. Comparing base (27722a5) to head (58d70a2).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...ck/storage/driver/OntapPrimaryDatastoreDriver.java 70.83% 2 Missing and 5 partials ⚠️
...torage/motion/StorageSystemDataMotionStrategy.java 0.00% 2 Missing ⚠️
...ud/hypervisor/kvm/storage/KVMStorageProcessor.java 0.00% 2 Missing ⚠️
server/src/main/java/com/cloud/api/ApiDBUtils.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14192      +/-   ##
============================================
+ Coverage     19.91%   19.92%   +0.01%     
- Complexity    20175    20192      +17     
============================================
  Files          6372     6373       +1     
  Lines        577139   577168      +29     
  Branches      70682    70689       +7     
============================================
+ Hits         114913   114982      +69     
+ Misses       449664   449618      -46     
- Partials      12562    12568       +6     
Flag Coverage Δ
uitests 3.71% <ø> (ø)
unittests 21.19% <66.66%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@piyush5netapp

Copy link
Copy Markdown
Contributor Author

Moving this back to draft PR as some more modification has been done on this. Will update and open for review again in few days.

@winterhazel
winterhazel self-requested a review October 8, 2026 03:14
sathvikaragi and others added 2 commits October 14, 2026 22:05
#115)

### Description

enabling VM snapshot for ISCSI stopped vm's in UI using ontapiSCSI pool
type

This PR...
<!--- Describe your changes in DETAIL - And how has behaviour
functionally changed. -->

<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to
reproduce. -->

<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically
be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->

<!---
*******************************************************************************
-->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE
DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!---
*******************************************************************************
-->

### Types of changes

- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [X] 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
- [X] Minor
- [ ] Trivial

### Screenshots (if appropriate):

### How Has This Been Tested?

1) created a ISCSI vm and stopped IT 
2) Took a snapshot in stopped state 
3) powered On the VM then created a file on it and write in to it.
4) Powered of the vm and reverted to snapshot that was taken when it was
in stopped state
5) after revert verified that file and contents are gone

before reverting:
<img width="724" height="159" alt="Screenshot 2026-10-08 at 12 03 39 PM"
src="https://github.com/user-attachments/assets/3f5861d2-fde9-4775-9f07-2a778d16dd03"
/>

after reverting:
<img width="825" height="475" alt="Screenshot 2026-10-08 at 12 02 09 PM"
src="https://github.com/user-attachments/assets/b515bc19-e582-4850-90c6-e7628cfc9486"
/>

<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran
to -->

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

<!-- see how your change affects other areas of the code, etc. -->

<!-- Please read the
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
document -->
…r serial number and by-id instead of by-path
@piyush5netapp

piyush5netapp commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Moving this back to draft PR as some more modification has been done on this. Will update and open for review again in few days.

@winterhazel @weizhouapache @nvazquez This PR is ready for review now.

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.

5 participants