owsferraro opened a new pull request, #12880: URL: https://github.com/apache/cloudstack/pull/12880
### Description This PR fixes two bugs in the PowerFlex storage integration. Fix 1: Snapshot volume ID ordering mismatch for VMs with multiple volumes When taking a group snapshot of a VM with multiple volumes, CloudStack calls snapshotGroup.getVolumeIds() from the PowerFlex API to retrieve the resulting snapshot volume IDs and maps them positionally against a locally-built list of volumeTO objects. The PowerFlex API provides no guarantee that the returned snapshot volume IDs are in the same order as the source volumes were submitted. When PowerFlex returns the IDs in a different order, the snapshot volumes are recorded with incorrect associations in the CloudStack database, which can cause data integrity issues on restore. The fix resolves this by matching each returned snapshot volume ID back to its corresponding source volume ID rather than relying on positional ordering. Fix 2: Remove deprecated allowOnExtManagedVol parameter from overwriteVolumeContent The PowerFlex API method overwriteVolumeContent, used during snapshot revert, accepted an allowOnExtManagedVol parameter in API version 3.5 that was removed in version 4.x. Passing this parameter against a PowerFlex 4.x deployment causes the API call to fail, breaking snapshot revert functionality entirely. The fix removes the allowOnExtManagedVol parameter from the overwriteVolumeContent call to align with the PowerFlex 4.x API. ### 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 - [x] Critical - [ ] Major - [ ] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? Triggered a group snapshot on a VM with multiple volumes against a PowerFlex environment where the API returns snapshot volume IDs in a different order than the source volumes were submitted, and verified that all snapshot-to-volume associations are recorded correctly in the database. Verified that snapshot revert (overwriteVolumeContent) completes successfully against a PowerFlex 4.6 deployment. Verified no regression in snapshot and revert behaviour on standard single-volume VM snapshots. #### How did you try to break this feature and the system with this change? Tested group snapshots with varying numbers of volumes to confirm ordering is resolved correctly in all cases, not just a two-volume scenario. Confirmed that removing allowOnExtManagedVol does not cause issues on the revert path beyond the version compatibility fix it addresses. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
