Damans227 opened a new issue, #14856:
URL: https://github.com/apache/cloudstack/issues/14856

   ### problem
   
   Creating a template from a snapshot on a FlashArray pool leaves a temporary 
volume record in the database forever.
   
   FlashArray cant read a snapshot directly, so CloudStack makes a temporary 
volume from the snapshot, copies from it, then deletes it. The delete removes 
the volume on the array, but the database record is never removed. It stays as 
an Allocated data disk named `<snapshot>_<time>.TMP`, keeps counting against 
the pool's allocated space, and shows up in listVolumes. Every template from 
snapshot adds another one.
   
   When the copy fails, the same code already removes the record. Only the 
success path misses it. The gap is in 
StorageSystemDataMotionStrategy.handleCopyAsyncToSecondaryStorageAdaptive.
   
   ### versions
   
   ACS 4.22.1.1, KVM, FlashArray over FibreChannel, Purity//FA 6.10.6. The code 
is the same on 4.22 and main.
   
   ### The steps to reproduce the bug
   
   1. Create a data volume on a FlashArray pool, attach it to a VM and take a 
snapshot.
   2. Create a template from the snapshot. It succeeds.
   3. Check for temporary volumes:
   
   ```
   > select id,name,state,removed from volumes where name like '%.TMP';
   | 45 | fc-vm4_fix15-test_20261125172935_1795627777483.TMP | Allocated | NULL 
|
   | 18 | snap1_1795191776737.TMP                            | Allocated | NULL 
|
   ```
   
   Record 18 is 40 GiB and is still charged to its pool, days after the 
template was made.
   
   ### What to do about it?
   
   Remove the temporary volume record after the copy, the same way the failure 
path already does.
   


-- 
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]

Reply via email to