cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
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
Date Thu, 16 Aug 2012 23:49:03 GMT
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 <nitin.mehta@citrix.com>
Authored: Thu Aug 16 15:40:56 2012 +0530
Committer: Alex Huang <alex.huang@citrix.com>
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<HostVO> storageServers = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.SecondaryStorage,
zoneId);
-        HostVO sserver = storageServers.get(0);
+        HostVO sserver = _storageMgr.getSecondaryStorageHost(zoneId);
+        String secondaryStorageURL = sserver.getStorageUrl();
 
         List<UploadVO> extractURLList = _uploadDao.listByTypeUploadStatus(volumeId,
Upload.Type.VOLUME, UploadVO.Status.DOWNLOAD_URL_CREATED);
 


Mime
View raw message