mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5607: Don't delete the template if its stored in other zones.
This commit is contained in:
parent
b88d3c6052
commit
b3d4b72508
|
|
@ -346,6 +346,11 @@ public class HypervisorTemplateAdapter extends TemplateAdapterBase {
|
|||
}
|
||||
}
|
||||
if (success) {
|
||||
if ((imageStores.size() > 1) && (profile.getZoneId() != null)) {
|
||||
//if template is stored in more than one image stores, and the zone id is not null, then don't delete other templates.
|
||||
return success;
|
||||
}
|
||||
|
||||
// delete all cache entries for this template
|
||||
List<TemplateInfo> cacheTmpls = imageFactory.listTemplateOnCache(template.getId());
|
||||
for (TemplateInfo tmplOnCache : cacheTmpls) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue