cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/4.2 to 956b170
Date Mon, 19 Aug 2013 18:21:52 GMT
Updated Branches:
  refs/heads/4.2 e2710f8bc -> 956b17012


CLOUDSTACK-4399:[Templates] template entries are deleted from
template_store_ref when downloadTemplate times out.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/956b1701
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/956b1701
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/956b1701

Branch: refs/heads/4.2
Commit: 956b170126cbb5c6da15c41bad96425b7d4c183d
Parents: e2710f8
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Aug 19 11:21:19 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Mon Aug 19 11:21:43 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/storage/image/TemplateServiceImpl.java   | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/956b1701/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index 057bef6..484bb3d 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@ -366,9 +366,8 @@ public class TemplateServiceImpl implements TemplateService {
 
                 }
             } else {
+                s_logger.info("Template Sync did not find " + uniqueName + " on image store
" + storeId + ", may request download based on available hypervisor types");
                 if (tmpltStore != null) {
-                    s_logger.info("Template Sync did not find " + uniqueName + " on image
store " + storeId
-                            + ", may request download based on available hypervisor types");
                     s_logger.info("Removing leftover template " + uniqueName + " entry from
template store table");
                     // remove those leftover entries
                     _vmTemplateStoreDao.remove(tmpltStore.getId());
@@ -392,20 +391,19 @@ public class TemplateServiceImpl implements TemplateService {
             // download.
             for (VMTemplateVO tmplt : toBeDownloaded) {
                 if (tmplt.getUrl() == null) { // If url is null we can't
-                    // initiate the download
+                    s_logger.info("Skip downloading template " + tmplt.getUniqueName() +
" since no url is specified.");
                     continue;
                 }
 
-                // if this is private template, skip
-                if (!tmplt.isPublicTemplate() && !tmplt.isFeatured()) {
-                    continue;
-                }
                 if (availHypers.contains(tmplt.getHypervisorType())) {
                     s_logger.info("Downloading template " + tmplt.getUniqueName() + " to
image store "
                             + store.getName());
                     associateTemplateToZone(tmplt.getId(), zoneId);
                     TemplateInfo tmpl = _templateFactory.getTemplate(tmplt.getId(), DataStoreRole.Image);
                     createTemplateAsync(tmpl, store, null);
+                } else {
+                    s_logger.info("Skip downloading template " + tmplt.getUniqueName() +
" since current data center does not have hypervisor "
+                            + tmplt.getHypervisorType().toString());
                 }
             }
         }


Mime
View raw message