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
This commit is contained in:
Nitin Mehta 2012-08-16 15:40:56 +05:30
parent 6d356b4b49
commit d1fd10fc43
1 changed files with 2 additions and 4 deletions

View File

@ -2946,11 +2946,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);