Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E6170918E for ; Thu, 16 Aug 2012 23:49:08 +0000 (UTC) Received: (qmail 13949 invoked by uid 500); 16 Aug 2012 23:49:04 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 13900 invoked by uid 500); 16 Aug 2012 23:49:04 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 13432 invoked by uid 99); 16 Aug 2012 23:49:03 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2012 23:49:03 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A5AE11DC20; Thu, 16 Aug 2012 23:49:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ahuang@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [27/32] git commit: bug CS-15278: Download Volume fails in case of Multiple Secondary Storages. Correcting it to use the same secondary storage to copy the volume and creating the soft link Reviewed-by: Kishan Message-Id: <20120816234903.A5AE11DC20@tyr.zones.apache.org> Date: Thu, 16 Aug 2012 23:49:03 +0000 (UTC) bug CS-15278: Download Volume fails in case of Multiple Secondary Storages. Correcting it to use the same secondary storage to copy the volume and creating the soft link Reviewed-by: Kishan Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/7d285a4a Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/7d285a4a Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/7d285a4a Branch: refs/heads/4.0 Commit: 7d285a4ac986708dbdc7a7681e8bc3a086cb4193 Parents: 69c0926 Author: Nitin Mehta Authored: Thu Aug 16 15:40:56 2012 +0530 Committer: Alex Huang Committed: Thu Aug 16 16:35:23 2012 -0700 ---------------------------------------------------------------------- .../src/com/cloud/server/ManagementServerImpl.java | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7d285a4a/server/src/com/cloud/server/ManagementServerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 32ed37d..3873499 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -2974,11 +2974,9 @@ public class ManagementServerImpl implements ManagementServer { } long accountId = volume.getAccountId(); - - String secondaryStorageURL = _storageMgr.getSecondaryStorageURL(zoneId); StoragePoolVO srcPool = _poolDao.findById(volume.getPoolId()); - List storageServers = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.SecondaryStorage, zoneId); - HostVO sserver = storageServers.get(0); + HostVO sserver = _storageMgr.getSecondaryStorageHost(zoneId); + String secondaryStorageURL = sserver.getStorageUrl(); List extractURLList = _uploadDao.listByTypeUploadStatus(volumeId, Upload.Type.VOLUME, UploadVO.Status.DOWNLOAD_URL_CREATED);