Skip to content

fix flasharray copy creating the volume in the source pod - #14853

Open
Damans227 wants to merge 1 commit into
apache:4.22from
Damans227:adaptive-copy-dest-pool
Open

Damans227 wants to merge 1 commit into
apache:4.22from
Damans227:adaptive-copy-dest-pool

Conversation

@Damans227

Copy link
Copy Markdown
Collaborator

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.

providerName=cs-prim-fc-p1::vol-4-1-2-22
> purevol list "cs-prim-fc-p2::*"
cs-prim-fc-p2::cs-prim-fc-p2-testvol   2G

After: volume moved from p2 to p1 is created in the p1 pod.

> migrate volume volumeid=3e71c4d8-6c60-43e9-a4ba-bb4b7635e12a storageid=<p1>
"storage": "cs-prim-fc-p1"

providerName=cs-prim-fc-p1::vol-3-1-2-39

> purevol list
cs-prim-fc-p1::vol-3-1-2-39   1G   cs-prim-fc-p2::vol-4-1-2-38-20261125154910

after-cloudstack-p1

after-array-p1

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.

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.33%. Comparing base (6489766) to head (72e2993).

Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #14853      +/-   ##
============================================
- Coverage     18.34%   18.33%   -0.01%     
- Complexity    16669    16671       +2     
============================================
  Files          5939     5939              
  Lines        537819   538126     +307     
  Branches      65941    65941              
============================================
+ Hits          98638    98664      +26     
- Misses       427960   428244     +284     
+ Partials      11221    11218       -3     
Flag Coverage Δ
uitests 4.08% <ø> (ø)
unittests 19.42% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Damans227
Damans227 marked this pull request as ready for review November 25, 2026 18:25

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant