Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0BFEC10679 for ; Sun, 3 Nov 2013 05:30:55 +0000 (UTC) Received: (qmail 54148 invoked by uid 500); 3 Nov 2013 05:30:54 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 54130 invoked by uid 500); 3 Nov 2013 05:30:48 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 54121 invoked by uid 99); 3 Nov 2013 05:30:45 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Nov 2013 05:30:45 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7B13639C30; Sun, 3 Nov 2013 05:30:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mchen@apache.org To: commits@cloudstack.apache.org Message-Id: <24d06040a85c4c7fb54bad320ded2158@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 99ead34 Date: Sun, 3 Nov 2013 05:30:45 +0000 (UTC) Updated Branches: refs/heads/master 2ff791b0b -> 99ead3419 Fix S3 system vm start issues caused by recent storage refactor work. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/99ead341 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/99ead341 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/99ead341 Branch: refs/heads/master Commit: 99ead3419c80fc7135a95f34ced7650eda3572fd Parents: 2ff791b Author: Min Chen Authored: Sat Nov 2 22:30:10 2013 -0700 Committer: Min Chen Committed: Sat Nov 2 22:30:10 2013 -0700 ---------------------------------------------------------------------- .../storage/resource/StorageSubsystemCommandHandlerBase.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99ead341/core/src/com/cloud/storage/resource/StorageSubsystemCommandHandlerBase.java ---------------------------------------------------------------------- diff --git a/core/src/com/cloud/storage/resource/StorageSubsystemCommandHandlerBase.java b/core/src/com/cloud/storage/resource/StorageSubsystemCommandHandlerBase.java index b43722a..4efeafd 100644 --- a/core/src/com/cloud/storage/resource/StorageSubsystemCommandHandlerBase.java +++ b/core/src/com/cloud/storage/resource/StorageSubsystemCommandHandlerBase.java @@ -18,6 +18,8 @@ */ package com.cloud.storage.resource; +import org.apache.log4j.Logger; + import org.apache.cloudstack.storage.command.AttachCommand; import org.apache.cloudstack.storage.command.CopyCommand; import org.apache.cloudstack.storage.command.CreateObjectAnswer; @@ -26,7 +28,6 @@ import org.apache.cloudstack.storage.command.DeleteCommand; import org.apache.cloudstack.storage.command.DettachCommand; import org.apache.cloudstack.storage.command.IntroduceObjectCmd; import org.apache.cloudstack.storage.command.StorageSubSystemCommand; -import org.apache.log4j.Logger; import com.cloud.agent.api.Answer; import com.cloud.agent.api.Command; @@ -67,7 +68,9 @@ public class StorageSubsystemCommandHandlerBase implements StorageSubsystemComma DataStoreTO srcDataStore = srcData.getDataStore(); DataStoreTO destDataStore = destData.getDataStore(); - if (srcData.getObjectType() == DataObjectType.TEMPLATE && srcData.getDataStore().getRole() == DataStoreRole.Image && destData.getDataStore().getRole() == DataStoreRole.Primary) { + if (srcData.getObjectType() == DataObjectType.TEMPLATE + && (srcData.getDataStore().getRole() == DataStoreRole.Image || srcData.getDataStore().getRole() == DataStoreRole.ImageCache) + && destData.getDataStore().getRole() == DataStoreRole.Primary) { //copy template to primary storage return processor.copyTemplateToPrimaryStorage(cmd); } else if (srcData.getObjectType() == DataObjectType.TEMPLATE && srcDataStore.getRole() == DataStoreRole.Primary && destDataStore.getRole() == DataStoreRole.Primary) {