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

   ### problem
   
   When a template is deleted, its copy on a FlashArray primary pool is never 
removed from the array.
   
   The cleanup job that removes the copy runs after the template is already 
marked as removed. The FlashArray driver then looks up the template, gets 
nothing back, and crashes before it ever contacts the array. The copy record in 
CloudStack is still removed, so nothing retries. The array keeps the copy under 
its original name, so it looks like a live template copy.
   
   The same lookup is done for volumes and snapshots in 
AdaptiveDataStoreDriverImpl.newManagedVolumeContext, with no check either.
   
   ### 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. Register a template and deploy a VM from it on a FlashArray pool, so the 
template gets copied to the pool.
   2. Destroy the VM with expunge.
   3. Delete the template.
   4. Wait for the storage cleanup job (storage.cleanup.interval).
   
   management-server.log:
   
       16:42:08,291 DEBUG [c.c.t.TemplateManagerImpl] Evicting 
TmplPool[14-208-4-type=FIBERWWN; ... providerName=cs-prim-fc-p2::tpl-4-0-2-208; 
...]
       16:42:08,297 DEBUG [o.a.c.s.d.d.AdaptiveDataStoreDriverImpl] Delete 
volume started
       16:42:08,298 ERROR [o.a.c.s.d.d.AdaptiveDataStoreDriverImpl] Result to 
volume delete failed with exception java.lang.NullPointerException: Cannot 
invoke "com.cloud.storage.VMTemplateVO.getAccountId()" because "template" is 
null
       16:42:08,306 DEBUG [c.c.t.TemplateManagerImpl] Failed to delete Template 
...
   
   On the array the copy is still there, untouched:
   
       > purevol list --pending
       cs-prim-fc-p2::tpl-4-0-2-208   8G
   
   ### What to do about it?
   
   Look up the template, volume or snapshot including removed rows, and dont 
crash if it is missing, so the delete reaches the array.
   


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