Allow endpoint selection logic for system templates in region and zone scopes

This commit is contained in:
Daman Arora 2026-01-14 14:12:00 -05:00
parent 6a324da27a
commit 387f958df1
1 changed files with 3 additions and 1 deletions

View File

@ -400,7 +400,9 @@ public class DefaultEndPointSelector implements EndPointSelector {
}
if (object instanceof TemplateInfo) {
TemplateInfo tmplInfo = (TemplateInfo)object;
if (store.getScope().getScopeType() == ScopeType.ZONE && store.getScope().getScopeId() == null && tmplInfo.getTemplateType() == TemplateType.SYSTEM) {
if (tmplInfo.getTemplateType() == TemplateType.SYSTEM &&
(store.getScope().getScopeType() == ScopeType.REGION ||
(store.getScope().getScopeType() == ScopeType.ZONE && store.getScope().getScopeId() == null))) {
return LocalHostEndpoint.getEndpoint(); // for bootstrap system vm template downloading to region image store
}
}