Skip to content

NetApp ONTAP ASUP Support - #14193

Open
suryag1201 wants to merge 4 commits into
apache:mainfrom
NetApp:netapp-ontap-asup-infra-support
Open

suryag1201 wants to merge 4 commits into
apache:mainfrom
NetApp:netapp-ontap-asup-infra-support

Conversation

@suryag1201

@suryag1201 suryag1201 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds AutoSupport (ASUP) telemetry for the ONTAP primary-storage plugin. On a configurable interval, It send below 2 details per cycle:
As a part of Event-0 (once per cluster): CloudStack connected to Unified ONTAP cluster — CloudStack version, OS, ONTAP version, cluster model, platform type, cluster UUID, management-server count.
As a part of Event-1 (once per pool): CloudStack storage pool backed by Unified ONTAP flexvolume — pool name/status, protocol, SVM, ONTAP volume UUID, root/data disk counts, logical size, VM/volume snapshot counts, multi-pool VM flag.

Scope: AutoSupport telemetry is supported only for ONTAP storage systems using cluster-based credentials.

Configuration

Global setting (UI: Configuration → Global Settings):
Key: ontap.autosupport.interval
Default : 24 hours (once a day)
Allowed values: 0 = disabled; otherwise 4–168 hours (1 week)
Validation: Out-of-range or non-integer values are rejected in the UI.

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):

image

How Has This Been Tested?

Set ontap.autosupport.interval to 0 — no data sent.
Set it to 24 (or any value 4–168) — event-0 once per cluster, event-1 once per pool, on that interval.
Set it below 4 or above 168 — UI validation error.
Create VMs/snapshots (including a VM across pools) and confirm the next event -1 payload updates.
Set back to 0 — events stop. Management server restart is not required.

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

This PR...
ASUP Implementation

- [ ] 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)
- [x] 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)

- [x] Major
- [ ] Minor

- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial

This is a testing screen shot, the min frequency is 4 hours, not 1 hour
<img width="1723" height="790" alt="image"
src="https://github.com/user-attachments/assets/f2351e08-6ce3-4925-a1e7-391dfd17cfc3"
/>

<img width="1584" height="523" alt="image"
src="https://github.com/user-attachments/assets/a4313ac9-de68-400a-81dc-1298e9b0a13b"
/>

Smart Solve Data

SmartSolve_EMS-LOG-FILEGZ_Asupid_2026091501340005.html

[?] Tue Sep 15 00:47:27 -0400 [sti245-vsim-ocvs032b: kernel:
ems.engine.suppressed:debug]: Event 'netinet6.rtr.high.mtu' suppressed
205 times in last 3634 seconds.
[ [?] ](javascript:void(0)) Tue Sep 15 00:47:27 -0400
[sti245-vsim-ocvs032b: kernel: netinet6.rtr.high.mtu:info]:
nd6_ra_input: MTU option mtu=9214 sent from fe80:3::21c:73ff:fe00:99;
exceeds the maxmtu 1500 on 'e0c'; ignoring.
[ [?] ](javascript:void(0)) Tue Sep 15 00:50:34 -0400
[sti245-vsim-ocvs032b: dense_ads_monitor:
sis.auto.session.change:notice]: ADS: Number of auto sessions changed
from 4 to 1
[?] Tue Sep 15 00:53:09 -0400 [sti245-vsim-ocvs032b: mgwd:
app.log.notice:notice]: **cstack08.rtp.openenglab.netapp.com: CloudStack
ONTAP plugin 4.23.0.0-SNAPSHOT: (0) provisioning: {"message":"CloudStack
connected to Unified ONTAP
cluster","cloudstackVersion":"4.23.0.0-SNAPSHOT","platform":"Linux
6.8.0-136-generic
(amd64)","ontapVersion":"9.17.1","ontapClusterModel":"SIMBOX","ontapPlatformType":"performance","clusterUuid":"7cd7613a-a571-11f1-b6f8-005056bdad8c","managementServerCount":1}
[ [?] ](javascript:void(0)) Tue Sep 15 00:53:09 -0400
[sti245-vsim-ocvs032b: mgwd: app.log.notice:notice]:
cstack08.rtp.openenglab.netapp.com: CloudStack ONTAP plugin
4.23.0.0-SNAPSHOT: (1) provisioning: {"message":"CloudStack storage pool
backed by Unified ONTAP
volume","poolName":"PoolNFS_43","poolStatus":"Up","protocol":"NFS3","clusterUuid":"7cd7613a-a571-11f1-b6f8-005056bdad8c","svm":"vs0","ontapVolumeUuid":"fb8fece4-a576-11f1-b46d-005056bd1333","rootDiskCount":1,"dataDiskCount":1,"totalLogicalSizeBytes":8589934592,"vmSnapshotCount":1,"volumeSnapshotCount":1,"multiPrimaryStoragePoolVm":false}**
[ [?] ](javascript:void(0)) Tue Sep 15 00:53:42 -0400
[sti245-vsim-ocvs032b: dense_ads_monitor:
sis.auto.session.change:notice]: ADS: Number of auto sessions changed
from 1 to 2
[?] Tue Sep 15 00:54:44 -0400 [sti245-vsim-ocvs032b: dense_ads_monitor:
sis.auto.session.change:notice]: ADS: Number of auto sessions changed
from 2 to 3
[?] Tue Sep 15 00:55:47 -0400 [sti245-vsim-ocvs032b: dense_ads_monitor:
sis.auto.session.change:notice]: ADS: Number of auto sessions changed
from 3 to 1
[?] Tue Sep 15 00:56:50 -0400 [sti245-vsim-ocvs032b: dense_ads_monitor:
sis.auto.session.change:notice]: ADS: Number of auto sessions changed
from 1 to 2
[ [?] ](javascript:void(0)) Tue Sep 15 00:57:52 -0400
[sti245-vsim-ocvs032b: dense_ads_monitor:
sis.auto.session.change:notice]: ADS: Number of auto sessions changed
from 2 to 3
[?] Tue Sep 15 00:58:55 -0400 [sti245-vsim-ocvs032b: dense_ads_monitor:
sis.auto.session.change:notice]: ADS: Number of auto sessions changed
from 3 to 1

1- Keep the ASUP disabled by keep value as 0 and check the events on
ONTAP - No events are getting generated
2- Enable the ASUP and check the events and it was getting triggered on
the given frequency on ontap
3- Verified the data on ontap for event 0 and event 1
4- Created the new VM and Snapshots, and VM across pools then required
field on new run took the new values.
5- Keep the ASUP frequency value less than or greater than required,
throw the error on UI
6- Disable the ASUP again by keep value as 0, the data stop getting
pushed to ontap

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 -->

---------

Co-authored-by: Gupta, Surya <Surya.Gupta@netapp.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@suryag1201 suryag1201 changed the title [CSTACKEX-204] ASUP Implementation (#69) NetApp ONTAP ASUP Support Sep 17, 2026
@rajiv-jain-netapp

Copy link
Copy Markdown
Contributor

@surya, I suggest we explicitly call out that the supportability scope is limited to storage systems managed using cluster-based credentials. This will help set clear expectations and avoid ambiguity around other authentication or management models.

@codecov

codecov Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.18868% with 158 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.44%. Comparing base (27722a5) to head (03349e9).
⚠️ Report is 93 commits behind head on main.

Files with missing lines Patch % Lines
...ache/cloudstack/storage/asup/OntapAsupManager.java 69.18% 73 Missing and 21 partials ⚠️
...he/cloudstack/storage/service/StorageStrategy.java 56.25% 29 Missing and 6 partials ⚠️
...main/java/com/cloud/storage/dao/VolumeDaoImpl.java 0.00% 10 Missing ⚠️
...stack/storage/utils/OntapConfigurationManager.java 76.31% 6 Missing and 3 partials ⚠️
...udstack/storage/feign/model/EmsApplicationLog.java 92.59% 3 Missing and 1 partial ⚠️
...he/cloudstack/storage/feign/model/ClusterNode.java 88.00% 3 Missing ⚠️
...he/cloudstack/storage/utils/OntapStorageUtils.java 50.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14193      +/-   ##
============================================
+ Coverage     19.91%   20.44%   +0.53%     
- Complexity    20175    21371    +1196     
============================================
  Files          6372     6485     +113     
  Lines        577139   588567   +11428     
  Branches      70682    72076    +1394     
============================================
+ Hits         114913   120352    +5439     
- Misses       449664   455151    +5487     
- Partials      12562    13064     +502     
Flag Coverage Δ
uitests 3.70% <ø> (-0.01%) ⬇️
unittests 21.75% <70.18%> (+0.57%) ⬆️

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.

@suryag1201
suryag1201 marked this pull request as ready for review September 17, 2026 15:48
@winterhazel winterhazel added this to the 24.0 milestone Sep 19, 2026
@winterhazel
winterhazel self-requested a review October 8, 2026 03:14
@nvazquez
nvazquez requested a balanced review from Copilot October 8, 2026 13:23

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

4 open findings
What changed in this PR

Adds AutoSupport (ASUP) telemetry reporting for the ONTAP primary-storage plugin, including a new global config key to control the reporting interval and best-effort EMS message publishing per cluster (event-id 0) and per pool (event-id 1).

Changes:

  • Introduces OntapAsupManager + OntapConfigurationManager and wires them into the ONTAP plugin Spring context.
  • Extends ONTAP Feign support (ClusterFeignClient nodes endpoint, new EmsFeignClient, new models) and adds StorageStrategy helpers to fetch cluster/node info and send EMS logs.
  • Adds DAO support + tests for multi-pool VM detection and ASUP payload correctness/interval validation.
File Description
plugins/​storage/​volume/​ontap/​src/​test/​java/​org/​apache/​cloudstack/​storage/​service/​StorageStrategyTest.java Adds unit tests for new StorageStrategy.getClusterInfo() model/platform rollups.
plugins/​storage/​volume/​ontap/​src/​test/​java/​org/​apache/​cloudstack/​storage/​asup/​OntapAsupManagerTest.java New test suite validating ASUP event routing, payload fields, interval validation, and scheduling behavior.
plugins/​storage/​volume/​ontap/​src/​main/​resources/​META-INF/​cloudstack/​storage-volume-ontap/​spring-storage-volume-ontap-context.xml Registers new ASUP/config manager beans in plugin context.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​utils/​OntapStorageUtils.java Splits strategy creation into “resolve without connect” vs “resolve + connect” paths for ASUP.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​utils/​OntapStorageConstants.java Adds constants for ASUP payload keys, interval config, and node fields selector.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​utils/​OntapConfigurationManager.java New ValidatedConfigKey registration + validator for ontap.autosupport.interval.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​service/​StorageStrategy.java Adds cluster/node info retrieval, ONTAP version formatting, and EMS ASUP send method.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​feign/​model/​EmsApplicationLog.java New model for EMS application-log POST payload.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​feign/​model/​ClusterNode.java New model for GET /api/cluster/nodes subset used by ASUP.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​feign/​model/​Cluster.java Adds non-serialized model / platformType fields for ASUP rollups.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​feign/​client/​EmsFeignClient.java New Feign client for POST /api/support/ems/application-logs.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​feign/​client/​ClusterFeignClient.java Adds GET /api/cluster/nodes endpoint support.
plugins/​storage/​volume/​ontap/​src/​main/​java/​org/​apache/​cloudstack/​storage/​asup/​OntapAsupManager.java New scheduled manager that composes and pushes ASUP telemetry messages.
plugins/​storage/​volume/​ontap/​pom.xml Adds dependency needed for management-server host counting.
engine/​schema/​src/​main/​java/​com/​cloud/​storage/​dao/​VolumeDaoImpl.java Adds existence query to detect multi-pool VMs (root on pool, data on another).
engine/​schema/​src/​main/​java/​com/​cloud/​storage/​dao/​VolumeDao.java Exposes hasMultiPrimaryStoragePoolVm(poolId) in DAO API.

🧠 Review effort: Lite


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java Outdated
suryag1201 added a commit to NetApp/cloudstack that referenced this pull request Oct 14, 2026
### Description

Upstream PR : apache#14193

1- This allocates an intermediate list and then traverses it three more
times. Since this runs once per pool per interval, on very large pools
this adds avoidable CPU/GC overhead. Consider computing rootDiskCount,
dataDiskCount, and totalLogicalSizeBytes in a single pass over volumes
(filtering by CS_VOLUME_STATES inline) to reduce allocations and
repeated streaming.
2- This treats a missing/unknown is_all_flash_optimized (null) as false,
which classifies the node as fas and can incorrectly set cluster
platformType when ONTAP doesn’t return these fields (permissions/older
versions/partial responses). Consider returning null (unknown) when the
required flags are absent and only adding non-null classifications to
the rollup set so ASUP doesn’t misreport hardware type.
3- The DAO method is documented as “non-destroyed” volumes, but the SQL
currently includes volumes in transitional/pre-provisioning states
(e.g., Allocated) because it only excludes Destroy/Expunged. That can
incorrectly flip multiPrimaryStoragePoolVm=true for VMs whose data disk
hasn’t actually been created/moved yet. Tighten the state predicates to
align with the intended “physically exists” semantics (e.g., include
only the same stable states you count elsewhere, or explicitly exclude
Allocated/upload-related states).
4- lock.unlock() is executed even when lock.lock(...) returns false
(early return), which can attempt to unlock a lock this thread never
acquired. Additionally, GlobalLock.getInternLock(...) typically requires
releasing the reference (e.g., releaseRef()) to avoid leaking the
interned lock object. Track a boolean locked and only unlock() when
true, and ensure the lock reference is released in finally (even when
not acquired).

fixed the above issues
<!---
*******************************************************************************
-->
<!--- 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

- [x] Major
- [ ] Minor

#### Bug Severity

- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial

### Screenshots (if appropriate):

### How Has This Been Tested?

<!-- 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 -->

---------

Co-authored-by: Gupta, Surya <Surya.Gupta@netapp.com>
@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@RosiKyu

RosiKyu commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

@suryag1201 could you please resolve the conflicts?

…ra-support

Co-authored-by: Cursor <cursoragent@cursor.com>
@suryag1201

Copy link
Copy Markdown
Contributor Author

@suryag1201 could you please resolve the conflicts?

@RosiKyu
Thank you for bringing this. I have resolved the conflicts, and the PR is now ready for review.
I would appreciate, if you could take a look.

@RosiKyu

RosiKyu commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

@rajiv-jain-netapp, @piyush5netapp , @sathvikaragi , @sandeeplocharla , this PR needs two reviews to be included in the 24.0 release. Could any of you help review it? Thanks!

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