Skip to content

Automation tests for Compute to Compute with Storage VM migration and Storage migration - #113

Merged
sandeeplocharla merged 9 commits into
mainfrom
feature/CSTACKEX-264
Dec 3, 2026
Merged

sandeeplocharla merged 9 commits into
mainfrom
feature/CSTACKEX-264

Conversation

@sandeeplocharla

@sandeeplocharla sandeeplocharla commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR...

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?

root@cstack53:/tmp/MarvinLogs/test_01_live_vm_with_storage_migration_3O3CIZ# cat results.txt
Live-migrate DefaultPrimary root/data volumes to NFS3 C1a. ... === TestName: test_01_nfs3_default_primary_to_cluster | Status : SUCCESS ===
ok
Live-migrate the NFS3 VM from C1a to C1b. ... === TestName: test_02_nfs3_cluster_to_cluster | Status : SUCCESS ===
ok
Live-migrate the NFS3 VM from C1b to Z1. ... === TestName: test_03_nfs3_cluster_to_zone | Status : SUCCESS ===
ok
Live-migrate the NFS3 VM from Z1 to Z2. ... === TestName: test_04_nfs3_zone_to_zone | Status : SUCCESS ===
ok
Live-migrate the NFS3 VM from Z2 back to C1a. ... === TestName: test_05_nfs3_zone_to_cluster | Status : SUCCESS ===
ok
Live-migrate DefaultPrimary root/data volumes to iSCSI C1a. ... === TestName: test_06_iscsi_default_primary_to_cluster | Status : SUCCESS ===
ok
Live-migrate the iSCSI VM from C1a to C1b. ... === TestName: test_07_iscsi_cluster_to_cluster | Status : SUCCESS ===
ok
Live-migrate the iSCSI VM from C1b to Z1. ... === TestName: test_08_iscsi_cluster_to_zone | Status : SUCCESS ===
ok
Live-migrate the iSCSI VM from Z1 to Z2. ... === TestName: test_09_iscsi_zone_to_zone | Status : SUCCESS ===
ok
Live-migrate the iSCSI VM from Z2 back to C1a. ... === TestName: test_10_iscsi_zone_to_cluster | Status : SUCCESS ===
ok
Reject a live NFS3-to-iSCSI volume mapping. ... === TestName: test_11_reject_nfs3_to_iscsi | Status : SUCCESS ===
ok
Reject a live iSCSI-to-NFS3 volume mapping. ... === TestName: test_12_reject_iscsi_to_nfs3 | Status : SUCCESS ===
ok
Reject migrateVolume livemigrate=true on a running attached volume. ... === TestName: test_13_reject_live_volume_only | Status : SUCCESS ===
ok
Live-migrate QoS disks from DefaultPrimary onto NFS3. ... === TestName: test_14_nfs3_qos_default_primary_to_cluster | Status : SUCCESS ===
ok
Live-migrate QoS disks between two NFS3 cluster pools. ... === TestName: test_15_nfs3_qos_cluster_to_cluster | Status : SUCCESS ===
ok
Live-migrate QoS disks from DefaultPrimary onto iSCSI. ... === TestName: test_16_iscsi_qos_default_primary_to_cluster | Status : SUCCESS ===
ok
Live-migrate QoS disks between two iSCSI cluster pools. ... === TestName: test_17_iscsi_qos_cluster_to_cluster | Status : SUCCESS ===
ok
Live NFS3 move keeps a different QoS policy on each disk. ... === TestName: test_18_nfs3_qos_root_and_data_different_policies | Status : SUCCESS ===
ok
After host split, live-migrate NFS3 storage from C1a to C2. ... === TestName: test_19_nfs3_cluster_to_cluster | Status : SUCCESS ===
ok
Live-migrate NFS3 storage from C1a to Z1 onto a C2 host. ... === TestName: test_20_nfs3_cluster_to_zone | Status : SUCCESS ===
ok
Live-migrate the NFS3 VM from Z1 to C2. ... === TestName: test_21_nfs3_zone_to_cluster | Status : SUCCESS ===
ok
Live-migrate NFS3 storage from Z1 to Z2 onto a C2 host. ... === TestName: test_22_nfs3_zone_to_zone | Status : SUCCESS ===
ok
Live-migrate iSCSI storage from C1a to C2 onto a C2 host. ... === TestName: test_23_iscsi_cluster_to_cluster | Status : SUCCESS ===
ok
Live-migrate iSCSI storage from C1a to Z1 onto a C2 host. ... === TestName: test_24_iscsi_cluster_to_zone | Status : SUCCESS ===
ok
Live-migrate the iSCSI VM from Z1 to C2. ... === TestName: test_25_iscsi_zone_to_cluster | Status : SUCCESS ===
ok
Live-migrate iSCSI storage from Z1 to Z2 onto a C2 host. ... === TestName: test_26_iscsi_zone_to_zone | Status : SUCCESS ===
ok
Reject mapping a cluster-1 pool to a host that lives in cluster 2. ... === TestName: test_27_reject_pool_not_reachable_from_destination_host | Status : SUCCESS ===
ok


Ran 27 tests in 13850.340s

OK

root@cstack53:/tmp/MarvinLogs/test_02_stopped_vm_storage_migration_Q9JG68# cat results.txt
Move a stopped VM's volumes from DefaultPrimary to NFS3 C1a. ... === TestName: test_01_nfs3_default_primary_to_cluster | Status : SUCCESS ===
ok
Move NFS3 volumes between cluster pools in the same cluster. ... === TestName: test_02_nfs3_cluster_to_cluster_same_cluster | Status : SUCCESS ===
ok
Move NFS3 volumes to a cluster pool in the second cluster. ... === TestName: test_03_nfs3_cluster_to_cluster_across_clusters | Status : SUCCESS ===
ok
Move NFS3 volumes from a cluster pool to a zone-wide pool. ... === TestName: test_04_nfs3_cluster_to_zone | Status : SUCCESS ===
ok
Move NFS3 volumes between two zone-wide pools. ... === TestName: test_05_nfs3_zone_to_zone | Status : SUCCESS ===
ok
Move NFS3 volumes from a zone-wide pool back to cluster C1a. ... === TestName: test_06_nfs3_zone_to_cluster | Status : SUCCESS ===
ok
Move a stopped VM's volumes from DefaultPrimary to iSCSI C1a. ... === TestName: test_07_iscsi_default_primary_to_cluster | Status : SUCCESS ===
ok
Move iSCSI volumes between cluster pools in the same cluster. ... === TestName: test_08_iscsi_cluster_to_cluster_same_cluster | Status : SUCCESS ===
ok
Move iSCSI volumes to a cluster pool in the second cluster. ... === TestName: test_09_iscsi_cluster_to_cluster_across_clusters | Status : SUCCESS ===
ok
Move iSCSI volumes from a cluster pool to a zone-wide pool. ... === TestName: test_10_iscsi_cluster_to_zone | Status : SUCCESS ===
ok
Move iSCSI volumes between two zone-wide pools. ... === TestName: test_11_iscsi_zone_to_zone | Status : SUCCESS ===
ok
Move iSCSI volumes from a zone-wide pool back to cluster C1a. ... === TestName: test_12_iscsi_zone_to_cluster | Status : SUCCESS ===
ok
Reject a stopped-VM migration from NFS3 storage to iSCSI. ... === TestName: test_13_reject_nfs3_to_iscsi | Status : SUCCESS ===
ok
Reject a stopped-VM migration from iSCSI storage to NFS3. ... === TestName: test_14_reject_iscsi_to_nfs3 | Status : SUCCESS ===
ok
Reject the stopped-VM API form once the chain VM is running. ... === TestName: test_15_reject_running_vm | Status : SUCCESS ===
ok
Move stopped QoS disks from DefaultPrimary onto NFS3. ... === TestName: test_16_nfs3_qos_default_primary_to_cluster | Status : SUCCESS ===
ok
Move stopped QoS disks between two NFS3 cluster pools. ... === TestName: test_17_nfs3_qos_cluster_to_cluster | Status : SUCCESS ===
ok
Move stopped QoS disks from DefaultPrimary onto iSCSI. ... === TestName: test_18_iscsi_qos_default_primary_to_cluster | Status : SUCCESS ===
ok
Move stopped QoS disks between two iSCSI cluster pools. ... === TestName: test_19_iscsi_qos_cluster_to_cluster | Status : SUCCESS ===
ok
Stopped iSCSI move keeps a different QoS policy on each disk. ... === TestName: test_20_iscsi_qos_root_and_data_different_policies | Status : SUCCESS ===
ok


Ran 20 tests in 5555.528s

OK

root@cstack53:/tmp/MarvinLogs/test_03_volume_migration_RC8T4O# cat results.txt
Migrate a detached NFS3 volume from DefaultPrimary to C1a. ... === TestName: test_01_nfs3_detached_default_primary_to_cluster | Status : SUCCESS ===
ok
Migrate the detached NFS3 volume from C1a to C1b. ... === TestName: test_02_nfs3_detached_cluster_to_cluster_same_cluster | Status : SUCCESS ===
ok
Migrate the detached NFS3 volume from C1b to C2. ... === TestName: test_03_nfs3_detached_cluster_to_cluster_across_clusters | Status : SUCCESS ===
ok
Migrate the detached NFS3 volume from C2 to Z1. ... === TestName: test_04_nfs3_detached_cluster_to_zone | Status : SUCCESS ===
ok
Migrate the detached NFS3 volume from Z1 to Z2. ... === TestName: test_05_nfs3_detached_zone_to_zone | Status : SUCCESS ===
ok
Migrate the detached NFS3 volume from Z2 back to C1a. ... === TestName: test_06_nfs3_detached_zone_to_cluster | Status : SUCCESS ===
ok
Migrate a detached iSCSI volume from DefaultPrimary to C1a. ... === TestName: test_07_iscsi_detached_default_primary_to_cluster | Status : SUCCESS ===
ok
Migrate the detached iSCSI volume from C1a to C1b. ... === TestName: test_08_iscsi_detached_cluster_to_cluster_same_cluster | Status : SUCCESS ===
ok
Migrate the detached iSCSI volume from C1b to C2. ... === TestName: test_09_iscsi_detached_cluster_to_cluster_across_clusters | Status : SUCCESS ===
ok
Migrate the detached iSCSI volume from C2 to Z1. ... === TestName: test_10_iscsi_detached_cluster_to_zone | Status : SUCCESS ===
ok
Migrate the detached iSCSI volume from Z1 to Z2. ... === TestName: test_11_iscsi_detached_zone_to_zone | Status : SUCCESS ===
ok
Migrate the detached iSCSI volume from Z2 back to C1a. ... === TestName: test_12_iscsi_detached_zone_to_cluster | Status : SUCCESS ===
ok
Move stopped-attached NFS3 data C1a to Z1, preserving its root. ... === TestName: test_13_nfs3_attached_stopped_vm_cluster_to_zone | Status : SUCCESS ===
ok
Move stopped-attached iSCSI data C1a to Z1, preserving its root. ... === TestName: test_14_iscsi_attached_stopped_vm_cluster_to_zone | Status : SUCCESS ===
ok
Move stopped-attached non-ONTAP data to ONTAP NFS3. ... === TestName: test_15_nfs3_attached_stopped_vm_default_to_ontap | Status : SUCCESS ===
ok
Move stopped-attached non-ONTAP data to ONTAP iSCSI. ... === TestName: test_16_iscsi_attached_stopped_vm_default_to_ontap | Status : SUCCESS ===
ok
Reject detached NFS3-to-iSCSI migration. ... === TestName: test_17_reject_detached_nfs3_to_iscsi | Status : SUCCESS ===
ok
Reject detached iSCSI-to-NFS3 migration. ... === TestName: test_18_reject_detached_iscsi_to_nfs3 | Status : SUCCESS ===
ok
Reject stopped-attached NFS3-to-iSCSI migration. ... === TestName: test_19_reject_stopped_attached_nfs3_to_iscsi | Status : SUCCESS ===
ok
Reject stopped-attached iSCSI-to-NFS3 migration. ... === TestName: test_20_reject_stopped_attached_iscsi_to_nfs3 | Status : SUCCESS ===
ok
Reject running-attached NFS3 migration without livemigrate. ... === TestName: test_21_reject_attached_running_vm_without_livemigrate | Status : SUCCESS ===
ok
Reject live volume-only migration in favor of VM-with-volume. ... === TestName: test_22_reject_attached_running_vm_with_livemigrate | Status : SUCCESS ===
ok
Reject migration to the stopped-attached volume's current pool. ... === TestName: test_23_reject_same_pool | Status : SUCCESS ===
ok
Migrate a detached NFS3 volume that was created with QoS. ... === TestName: test_24_nfs3_qos_detached_cluster_to_cluster | Status : SUCCESS ===
ok
Migrate a detached iSCSI volume that was created with QoS. ... === TestName: test_25_iscsi_qos_detached_cluster_to_cluster | Status : SUCCESS ===
ok
Migrate one stopped NFS3 data disk and leave the root disk. ... === TestName: test_26_nfs3_qos_attached_stopped_vm | Status : SUCCESS ===
ok
Migrate one stopped iSCSI data disk and leave the root disk. ... === TestName: test_27_iscsi_qos_attached_stopped_vm | Status : SUCCESS ===
ok
Migrate a QoS volume from DefaultPrimary onto NFS3. ... === TestName: test_28_nfs3_qos_detached_default_primary_to_ontap | Status : SUCCESS ===
ok


Ran 28 tests in 2224.683s

OK

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.73%
Branch coverage 18.86%

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

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.73%
Branch coverage 18.86%

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.84%
Branch coverage 19.00%

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

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

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 26.29%
Branch coverage 20.78%

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

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

and host URLs come from `test/integration/plugins/ontap/ontap.cfg`. Do not
hard-code them in test code.

Deeper design lives in the Cursor skill

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Skip having cursor specific details here.

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.

No, this has been pushed on purpose to be able to reuse. Also, if you could recall, I've asked regarding this in scrum and Rajiv was ok with it as long as such files are not pushed to upstream.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes, I understand. My point of this comment is Agents.md is meant to be harness agnostic, let it be cursor, claude , copilot. If we want to have specific harness agents.md, it can sit inside their own folder. (like co-pilot-instructions.md etc)

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.

Got it! will remove any mention of cursor in this.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Guys, In longer runs, we may plan to push this code also to upstream hence make sure no footprints of any AI tool should not be left in the code.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Agree, please resolve this

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.

I've addressed piyush's concern already. This file no longer has any stickiness to any harness. Further, we've already discussed in the scrum that in an event of raising automation code to upstream we should add *.md to .gitignore, so this shouldn't be a problem.

… text

- test_01: move the five live QoS cases to test_14-test_18 so they run while both hosts are in the primary cluster; expunge each QoS VM after its check
- test_01/test_02: match the current cross-protocol rejection message
…ed FlexVols

Setup no longer selects existing OntapMigration FlexVols. Stopped-VM QoS cases
create a fresh pool per case, so repeated LUN creates do not fill one 20 GiB
volume and fail with ONTAP error 1245212.
The path-change assertions in the volume migration suite skipped iSCSI, so
cases 07-12, 14 and 16 could pass without checking that the volume path
changed. Run the assertion for both protocols, as the automation spec says.

Verified on the lab: all 28 volume_migration cases pass with the check on.

Also remove a trailing blank line in test_01 to fix the end-of-file
pre-commit hook.
@netapp-cloudstack

netapp-cloudstack Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

ONTAP storage plugin test coverage

Line Branch Method
Unit tests not available not available not available
Functional (Marvin) tests 36.8% 23.8% 45.0%
Combined 36.8%

Least covered files (by lines not covered by either run):

File Lines Unit Functional Combined
driver/OntapPrimaryDatastoreDriver.java 1110 n/a 30.8% 30.8%
vmsnapshot/OntapVMSnapshotStrategy.java 567 n/a 0.5% 0.5%
service/UnifiedSANStrategy.java 480 n/a 38.1% 38.1%
service/StorageStrategy.java 517 n/a 46.2% 46.2%
service/UnifiedNASStrategy.java 433 n/a 43.2% 43.2%
asup/OntapAsupManager.java 253 n/a 15.8% 15.8%
feign/model/FileInfo.java 105 n/a 0.0% 0.0%
lifecycle/OntapPrimaryDatastoreLifecycle.java 332 n/a 71.1% 71.1%
utils/OntapStorageUtils.java 107 n/a 28.0% 28.0%
listener/OntapHostListener.java 122 n/a 41.8% 41.8%

Unit-test coverage was not produced by this build.

Functional coverage report

@suryag1201

Copy link
Copy Markdown

only minIOPS =0 test is covered here, how about AFF where minIOPS > 0 also?

@sandeeplocharla

Copy link
Copy Markdown
Collaborator Author

only minIOPS =0 test is covered here, how about AFF where minIOPS > 0 also?

As this is to test migration, the idea is to check if the same qos policy is being applied on the volume post migration. So, the content of the qos policy shouldn't be of concern to the migration code, as it simply reuses the existing policies.

@sandeeplocharla
sandeeplocharla merged commit 0701daa into main Dec 3, 2026
12 of 14 checks passed
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.

6 participants