Description
problem
When delete a template, ACS will remove the image from secondary storages.
however, the template images are not immediately removed on primary storages even if it is not used by any VMs.
versions
4.20 + NFS
I think the issue exists in other ACS versions and storage agonistic
The steps to reproduce the bug
- register a template
- deploy some vms
- expunge the vms
- delete the template
now check template_spool_ref
table to get the path of template image on primary storages
check the files on storage, they are still there
What to do about it?
More findings:
there are some global settings for template cleanup
- storage.cleanup.enabled (default: true)
- storage.template.cleanup.enabled (default: true)
- storage.cleanup.interval (default: 86400 seconds= 1 day)
the unused templates will be marked as GC in the first round and removed in the next round.
so the templates might be removed in two rounds (2 days with default settings)
since the template has been removed in ACS and it is not used by any VM, we could remove it immediately from primary storages, which will free the storage space as soon as possible.
Metadata
Metadata
Assignees
Type
Projects
Status