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/master to 5d3bc53
Date Mon, 19 Aug 2013 18:27:28 GMT
Updated Branches:
  refs/heads/master 3c1b6c69b -> 5d3bc5339


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/5d3bc533
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5d3bc533
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5d3bc533

Branch: refs/heads/master
Commit: 5d3bc5339ee3326117de78709e178b7419e262b5
Parents: 3c1b6c6
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:27:16 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/5d3bc533/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 ea56f6d..7d9a740 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
@@ -367,9 +367,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());
@@ -393,20 +392,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