cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anim...@apache.org
Subject [4/4] git commit: updated refs/heads/4.2 to 6ba0c7e
Date Thu, 22 Aug 2013 23:03:57 GMT
CLOUDSTACK-4455:object_store - Template sync results in private
templates being synced to all the secondary stores.
(cherry picked from commit 18aacd48a2cac2f66b6ff7c70a73dc39b8d6ece1)

Signed-off-by: animesh <animesh@apache.org>


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

Branch: refs/heads/4.2
Commit: 6ba0c7e67bc2ba6195c391a58cbda4c2efce22ea
Parents: a49d39f
Author: Min Chen <min.chen@citrix.com>
Authored: Thu Aug 22 15:37:37 2013 -0700
Committer: animesh <animesh@apache.org>
Committed: Thu Aug 22 15:53:35 2013 -0700

----------------------------------------------------------------------
 .../apache/cloudstack/storage/image/TemplateServiceImpl.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ba0c7e6/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 92470ed..a77270f 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
@@ -73,6 +73,7 @@ import com.cloud.exception.ResourceAllocationException;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.StoragePool;
+import com.cloud.storage.Storage.TemplateType;
 import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.storage.VMTemplateZoneVO;
@@ -404,6 +405,11 @@ public class TemplateServiceImpl implements TemplateService {
                                 s_logger.info("Skip downloading template " + tmplt.getUniqueName()
+ " since no url is specified.");
                                 continue;
                             }
+                            // if this is private template, skip sync to a new image store
+                            if (!tmplt.isPublicTemplate() && !tmplt.isFeatured()
&& tmplt.getTemplateType() != TemplateType.SYSTEM) {
+                                s_logger.info("Skip sync downloading private template " +
tmplt.getUniqueName() + " to a new image store");
+                                continue;
+                            }
 
                             if (availHypers.contains(tmplt.getHypervisorType())) {
                                 s_logger.info("Downloading template " + tmplt.getUniqueName()
+ " to image store "


Mime
View raw message