Skip to content

CSTACKEX-286: Automation testing for storagepool resize - #104

Open
sp16743 wants to merge 5 commits into
mainfrom
automation/CSTACKEX-286
Open

sp16743 wants to merge 5 commits into
mainfrom
automation/CSTACKEX-286

Conversation

@sp16743

@sp16743 sp16743 commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR...

Automation test coverage for ONTAP primary storage pool resize on both NFS3 and iSCSI, covering grow, safe shrink, and reject-when-used-space-would-be-exceeded.

1.test_02_grow_storage_pool — grow the empty pool by ONTAP_MIN_VOLUME_SIZE, then poll until CloudStack capacitybytes and ONTAP FlexVol space.size match the request and the pool stays Up (NFS export policy / iSCSI igroups unchanged).
2.test_03_shrink_storage_pool — shrink back to the original size and assert the same CloudStack + ONTAP convergence.
3.test_10_reject_shrink_below_used_capacity — after a new pool + volume, attempt a shrink below ONTAP used space (target kept above the 20 MiB FlexVol minimum). Expect CloudstackAPIException; volume, pool capacity, and protocol objects stay unchanged.

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

Screenshot 2026-09-21 at 6 39 50 PM Screenshot 2026-09-21 at 6 50 45 PM Maximum Size of ONTAP flexVol

How Has This Been Tested?

What was verified:
Pool lifecycle — NFS3 and iSCSI

1.test_02_grow_storage_pool
Grow pool to the 300 TiB ONTAP limit.
Verify CloudStack and FlexVol capacities match.

2.test_03_reject_grow_above_max_size
Reject growth to 300 TiB + 1 GiB.
Verify capacity and protocol resources remain unchanged.

3.test_04_shrink_storage_pool
Safely shrink the pool to its original size.

4.test_08_resize_storage_pool_in_maintenance
Resize while the pool is in maintenance mode.

5.test_13_reject_shrink_below_used_capacity
Reject shrinking below actual used space without affecting existing resources.

6.test_14_resize_pool_with_vm_attached
Resize while a volume is attached to a running VM.
Verify attachment, export policy/LUN, and pool state remain intact.

Zone-scoped pool — NFS3 and iSCSI
1.test_02_grow_zone_scoped_pool
Grow a zone-scoped pool.
Verify CloudStack capacity and ONTAP FlexVol size increase.
Confirm the pool remains Up and protocol resources are preserved.

2.test_03_shrink_zone_scoped_pool
Shrink the zone-scoped pool to its original size.
Verify CloudStack and ONTAP capacities match.
Confirm the pool remains Up and protocol resources are preserved.

Environment:
CloudStack management server with the NetApp ONTAP plugin deployed (integration API on port 8096)
KVM cluster from test/integration/plugins/ontap/ontap.cfg
ONTAP SVM with NFS3 and iSCSI enabled, at least one data LIF per protocol
Tests executed from the repo root using the ONTAP Marvin venv (setup_env.sh)

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

@sp16743 sp16743 changed the title CSTACKEX-286: Automation changes for storagepool resize CSTACKEX-286: Automation testing for storagepool resize Sep 16, 2026
@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.74%
Branch coverage 18.87%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.74%
Branch coverage 18.87%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

06 Enter maintenance mode and delete the storage pool
07 Create a new pool and allocate a CloudStack data volume (LUN created)
08 Delete the volume (LUN removed), enter maintenance, force-delete pool
02 Increase storage pool capacity

@suryag1201 suryag1201 Sep 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please check the following
1- The functionality follow the same path if we have pool on zone scoped level, how resize works?
2- If we put pool in maintenance then what is the resize behaviour.
3- With Live VMs, resize operation?
1-what is the limit with that pool can grow?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Checked it:-

  1. Storage pool resize works the same for zone scoped.
  2. If pool is in maintenance still pool resize works.
  3. With live VMs also it works, and VMs are in running state.
  4. The limit which storage pool can grow is till 300TiB

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I am assuming you have captured the aboce usecases in your qtest and automation usecases implementations

06 Enter maintenance mode and delete the storage pool
07 Create a new pool and allocate a CloudStack data volume (LUN created)
08 Delete the volume (LUN removed), enter maintenance, force-delete pool
02 Increase storage pool capacity

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I am assuming you have captured the aboce usecases in your qtest and automation usecases implementations

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

as per the details in testing done section, are we supporting shrink for both NFS and iSCSI? can you be specific based on protocol, and call out their behaviour separately?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes,for storage pool resize ,shrink works for both NFS and iSCSI.

@sp16743
sp16743 marked this pull request as draft September 21, 2026 09:56
@sp16743
sp16743 marked this pull request as ready for review September 21, 2026 10:05
…ive VMs are present, when pool is in maintenance.

Pool lifecycle (both NFS3 and iSCSI), now 15 tests:
  - test_03 rejects a grow past the 300 TiB ONTAP FlexVol maximum,
    asserting ONTAP's autosize-maximum error.
  - test_12 deploys a VM and attaches the volume.
  - test_14 grows and shrinks the pool while the VM holds the volume,
    checking the VM stays running and keeps the volume

Zone-scoped pool (both protocols), now 6 tests:
  - test_02 and test_03 grow and safely shrink the pool, verifying the
    export policy (NFS3) and igroups (iSCSI) are present after resize.
@sp16743
sp16743 force-pushed the automation/CSTACKEX-286 branch from ca893c1 to 07916ec Compare September 21, 2026 10:21
@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.74%
Branch coverage 18.87%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.74%
Branch coverage 18.87%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants