Skip to content

Commit df35e59

Browse files
committed
Refactor bootstrap system VM template handling to simplify endpoint selection logic
1 parent 2f62947 commit df35e59

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

engine/storage/src/main/java/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,8 @@ public EndPoint select(DataObject object) {
400400
}
401401
if (object instanceof TemplateInfo) {
402402
TemplateInfo tmplInfo = (TemplateInfo)object;
403-
if (tmplInfo.getTemplateType() == TemplateType.SYSTEM &&
404-
(store.getScope().getScopeType() == ScopeType.REGION ||
405-
(store.getScope().getScopeType() == ScopeType.ZONE && store.getScope().getScopeId() == null))) {
406-
return LocalHostEndpoint.getEndpoint(); // for bootstrap system vm template downloading to region image store
403+
if (tmplInfo.getTemplateType() == TemplateType.SYSTEM) {
404+
return LocalHostEndpoint.getEndpoint(); // for bootstrap system vm template downloading when no SSVM is available
407405
}
408406
}
409407
return null;

0 commit comments

Comments
 (0)