You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flasharray: deleting a template leaves its copy on the array #14854
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
Register a template and deploy a VM from it on a FlashArray pool, so the template gets copied to the pool.
Destroy the VM with expunge.
Delete the template.
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.
Activity