Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
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:
|
|
Verified working. Verified on CloudStack 4.22.1.1, packages rebuilt from patched source (version string unchanged at 4.22.1.1~noble). Management server and both KVM hosts on Ubuntu 24.04.4 LTS, kernel 6.8.0-147-generic, OpenJDK 21, MySQL 8.0.46. Pure FA-X20R4 sv16-x20r4-b06-15, Purity//FA 6.10.6, REST API 2.23, FibreChannel 32/16 Gbit, provider Flash Array. Created a 5 GiB data volume on cs-prim-fc-p2 (pool id 4), attached it to materialise the array object, detached, and migrated to cs-prim-fc-p1 (pool id 3): The pod prefix and pool_id now agree. On 4.22.1.1 this lands as cs-prim-fc-p2::vol-3-1-2-62 — the destination pool's id inside the source pod's namespace , so capacity accounting is wrong in both pools permanently, and pool deletion acts on the wrong pod. The Source: column also shows the source volume renamed-and-destroyed during the same operation, so #13049 is exercised alongside this. Tested the migrateVolume path specifically, which was the most serious of the three reproductions because the administrator names the destination explicitly and the API reports success. The other two paths (createVolume from snapshot, cold vmStorageMigration) share the same copyAsync() call site and were not separately re-run. |
Fixes #14852
When a volume is copied or moved between two FlashArray pools, the new volume is created in the source pool's pod, but CloudStack records it under the destination pool. The copy step built the array connection and the destination volume from the source pool. This uses the destination pool for both, so the volume lands in the destination pod. If the pools are on different arrays, the copy now fails with "Unable to find current volume to copy from" instead of landing in the wrong pod.
Test:
Two FlashArray pools on the same array, cs-prim-fc-p1 and cs-prim-fc-p2, each on its own pod. Create a 1 GB data volume, attach and detach it so it exists on the array, then migrate it to the other pool.
Before: volume moved from p1 to p2 is created in the p1 pod. p2 gets nothing.
After: volume moved from p2 to p1 is created in the p1 pod.
Also added unit tests for the copy going through the destination pool, and for the copy failing cleanly when the destination cant reach the source.