Repository navigation
Conversation
…cessed as an image-store snapshot
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 25.78% |
| Branch coverage | 20.08% |
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
rajiv-jain-netapp
left a comment
There was a problem hiding this comment.
I was reviewing the workflow, and I think it would be better to keep the location as Primary for ONTAP in all cases rather than leaving it as null. Your earlier proposed fix seems correct and also aligns well with the existing CloudStack framework workflow. We can restore the primary check and set locationType to Primary, as shown in the sample below.
if (storagePool != null && storagePool.isManaged()
&& DataStoreProvider.ONTAP_PLUGIN_NAME.equals(storagePool.getStorageProviderName())) {
payload.setLocationType(Snapshot.LocationType.PRIMARY);
}
boolean archiveSnapshotToSecondary = backupSnapToSecondary
&& !isManagedPrimaryLocationSnapshot(storagePool, payload);
Description
ONTAP volume snapshots should always remain on the ONTAP primary storage pool.
When taking a snapshot of an ONTAP NFS volume that is not attached to a VM, CloudStack successfully creates the FlexVol snapshot on ONTAP primary storage but incorrectly processes it as an image-store snapshot.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Before the fix:

After the fix:

How Has This Been Tested?
-Created an NFS snapshot from an attached volume.
-Created an NFS snapshot from a detached volume.
-Created an iSCSI snapshot from an attached volume.
-Created an iSCSI snapshot from a detached volume.
-Verified each snapshot reached BackedUp.
-Verified each snapshot had location_type=PRIMARY.
-Verified no image-store reference was created.
How did you try to break this feature and the system with this change?