Repository navigation
NetApp ONTAP Storage Pool resize - #14523
Conversation
|
@blueorangutan package |
|
@sandeeplocharla 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19835 |
storage pool resize (Grow and shrink)
This PR...
<!--- Describe your changes in DETAIL - And how has behaviour
functionally changed. -->
[updateStoragePool] API now resizes the ONTAP FlexVolume backing the
pool. When called with a new [capacityBytes], StorageManagerImpl
(previously never called the lifecycle hook) now invokes
[OntapPrimaryDatastoreLifecycle.updateStoragePool()], which calls the
ONTAP REST API
(PATCH /api/storage/volumes/{uuid}) and polls the async job to
completion. No validation is applied — the new size is passed directly
to ONTAP, which enforces all constraints and returns any errors as-is.
This also includes UT's.
<!-- 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 -->
<!---
*******************************************************************************
-->
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] 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)
- [ ] Major
- [x] Minor
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
the flex volume is created with size 20GiB:
<img width="1550" height="870" alt="Screenshot 2026-08-07 at 2 53 44 PM"
src="https://github.com/user-attachments/assets/b312f4ec-b4b7-420a-9b1e-81e392a882c4"
/>
case 1: when A valid input for resize is filled by user:
<img width="1458" height="681" alt="Screenshot 2026-08-07 at 2 54 17 PM"
src="https://github.com/user-attachments/assets/bb0caf98-df9b-4d6f-ae76-0ca4f7659a0f"
/>
<img width="1255" height="736" alt="Screenshot 2026-08-07 at 2 54 44 PM"
src="https://github.com/user-attachments/assets/7c0b8f49-213f-4163-971a-3a39c1d49936"
/>
after successful resize:
<img width="1555" height="836" alt="Screenshot 2026-08-07 at 3 23 15 PM"
src="https://github.com/user-attachments/assets/b7de8bfb-d8ca-4983-ae58-6c0c2503d943"
/>
case 2: capacity bytes given is smaller than ontap volume minimum size
<img width="1476" height="846" alt="Screenshot 2026-08-07 at 2 49 58 PM"
src="https://github.com/user-attachments/assets/a670be26-ab86-4e79-be50-86dd68bf39e9"
/>
case 3: capacity bytes given is smaller than ontap volume maximum size
<img width="1469" height="874" alt="Screenshot 2026-08-07 at 2 52 11 PM"
src="https://github.com/user-attachments/assets/da10b5c8-f9a3-4651-a1c2-404a908f4832"
/>
UT's for it :
Ran just the update storage pool tests in storagestrategytest and
primarydatastorelifecycletest
<img width="856" height="773" alt="Screenshot 2026-08-14 at 4 07 37 PM"
src="https://github.com/user-attachments/assets/b3d23c36-b635-48da-9403-aad5cd5685a6"
/>
Ran all tests in both the files:
<img width="868" height="788" alt="Screenshot 2026-08-14 at 4 09 12 PM"
src="https://github.com/user-attachments/assets/956e7c0c-190c-478f-be79-5a77623cb0bc"
/>
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran
to -->
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 -->
5bbc97e to
bc4ccb8
Compare
piyush5netapp
left a comment
There was a problem hiding this comment.
clgtm. Consider the logger message in subsequent PRs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14523 +/- ##
=========================================
Coverage 20.83% 20.84%
- Complexity 20973 20975 +2
=========================================
Files 6053 6053
Lines 548955 548994 +39
Branches 73359 73362 +3
=========================================
+ Hits 114377 114415 +38
+ Misses 421186 421185 -1
- Partials 13392 13394 +2
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:
|
…ize upstream PR (#136) ### Description This PR resolves the comments received on apache#14523 1. The update storage pool now reuses the existing constants for flexVols. <!--- ******************************************************************************* --> <!--- 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? <!-- 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 -->
|
@blueorangutan test |
|
@rajiv-jain-netapp do you have any further feedback on this PR or we can merge it once the smoke tests are executed? Thank you! |
|
@RosiKyu a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17605)
|
Hello @RosiKyu |
|
@blueorangutan package |
|
@RosiKyu 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 20145 |
|
@blueorangutan test |
|
@RosiKyu a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@sandeeplocharla could you please resolve the conflicts? Thank you! |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
|
@RosiKyu 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 20168 |
|
@blueorangutan test |
|
@RosiKyu a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17616)
|
|
[SF] Trillian test result (tid-17633)
|
|
Hello @RosiKyu , Are you seeking for any further details for this PR? |
|
Thank you @rajiv-jain-netapp . The PR has 2 approvals, the smoke tests on the latest commit passed (157 OK, 0 errors), there are no open review threads and all GitHub checks are green. Merging. |
| @@ -551,7 +551,34 @@ public boolean migrateToObjectStore(DataStore store) { | |||
|
|
|||
| @Override | |||
| public void updateStoragePool(StoragePool storagePool, Map<String, String> details) { | |||
There was a problem hiding this comment.
@sandeeplocharla should we validate a minimum size inside this method? To prevent operators from shrinking the volume to below ONTAP_MIN_VOLUME_SIZE_IN_BYTES and the currently allocated/used capacity.
It also may be nice to check whether the new size is already the current size and, in case it is, return early and avoid an unnecessary call to the storage.
There was a problem hiding this comment.
Hi @winterhazel!! We are currently relying on ONTAP's validation for rejecting shrink. For the same size, there's already validation before, so the call wouldn't even reach here.
Description
This PR enables the user to resize Primary StoragePool created using NetApp ONTAP storage plugin.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
iSCSI type Primary StoragePool Resize
Create Primary StoragePool of iSCSI type and Cluster scoped of size 20GiBOn ONTAP - backing flexVolResizing the StoragePool to 30 GiBOn ONTAP - backing flexVol - resizedNFS3 type Primary StoragePool Resize
Create Primary StoragePool of NFS3 type and Cluster scoped of size 20GiBOn ONTAP - backing flexVolResizing the StoragePool to 30 GiBOn ONTAP - backing flexVol - resized