This is an automated email from the ASF dual-hosted git repository.
bstoyanov pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push:
new bbc23a74683 fix install path for systemvm templates when introducing
new sec storage (#11605)
bbc23a74683 is described below
commit bbc23a74683052228d254ba0e4958f4c19254f90
Author: Bernardo De Marco Gonçalves <[email protected]>
AuthorDate: Mon Jan 26 09:14:40 2026 -0300
fix install path for systemvm templates when introducing new sec storage
(#11605)
---
.../org/apache/cloudstack/storage/image/TemplateServiceImpl.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
b/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index 1bb954da410..c18be7c7335 100644
---
a/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++
b/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@ -1318,9 +1318,10 @@ public class TemplateServiceImpl implements
TemplateService {
if
(_vmTemplateStoreDao.isTemplateMarkedForDirectDownload(tmplt.getId())) {
continue;
}
- tmpltStore =
- new TemplateDataStoreVO(storeId, tmplt.getId(), new
Date(), 100, Status.DOWNLOADED, null, null, null,
-
TemplateConstants.DEFAULT_SYSTEM_VM_TEMPLATE_PATH + tmplt.getId() + '/',
tmplt.getUrl());
+ String templateDirectoryPath =
TemplateConstants.DEFAULT_TMPLT_ROOT_DIR + File.separator +
TemplateConstants.DEFAULT_TMPLT_FIRST_LEVEL_DIR;
+ String installPath = templateDirectoryPath +
tmplt.getAccountId() + File.separator + tmplt.getId() + File.separator;
+ tmpltStore = new TemplateDataStoreVO(storeId, tmplt.getId(),
new Date(), 100, Status.DOWNLOADED,
+ null, null, null, installPath, tmplt.getUrl());
tmpltStore.setSize(0L);
tmpltStore.setPhysicalSize(0); // no size information for
// pre-seeded system vm templates