syed commented on a change in pull request #4875:
URL: https://github.com/apache/cloudstack/pull/4875#discussion_r619394901
##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1596,6 +1596,19 @@ private Volume orchestrateAttachVolumeToVM(Long vmId,
Long volumeId, Long device
StoragePoolVO destPrimaryStorage = null;
if (exstingVolumeOfVm != null &&
!exstingVolumeOfVm.getState().equals(Volume.State.Allocated)) {
destPrimaryStorage =
_storagePoolDao.findById(exstingVolumeOfVm.getPoolId());
+ if(destPrimaryStorage.getPodId() == null) {
+ destPrimaryStorage.setPodId(vm.getPodIdToDeployIn());
+
+ }
+ if(destPrimaryStorage.getClusterId() == null) {
+ HostVO hostVO = null;
+ if (vm.getHostId() != null) {
+ hostVO = _hostDao.findById(vm.getHostId());
+ } else {
+ hostVO = _hostDao.findById(vm.getLastHostId());
+ }
+ destPrimaryStorage.setClusterId(hostVO.getClusterId());
Review comment:
Do we want to set the clusterID for zonewide storage too?
##########
File path:
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
##########
@@ -772,7 +780,12 @@ protected Answer copyFromSwiftToNfs(CopyCommand cmd,
DataTO srcData, SwiftTO swi
}
}
- File destFile = SwiftUtil.getObject(swiftTO, downloadDirectory,
srcData.getPath());
+ String filePath = downloadPath + File.separator +
destData.getName();
Review comment:
Are you not using the `getPath` to find the path of the object anymore?
does `downloadPath` consider the difference between snapshot and template and
now volume?
##########
File path:
core/src/main/java/com/cloud/storage/template/SwiftVolumeDownloader.java
##########
@@ -0,0 +1,397 @@
+//
Review comment:
Where would this run? On the mgmt server or on the SSVM?
##########
File path:
server/src/main/java/com/cloud/storage/download/DownloadMonitorImpl.java
##########
@@ -218,7 +221,8 @@ public void downloadVolumeToStorage(DataObject volume,
AsyncCompletionCallback<D
Long maxVolumeSizeInBytes = getMaxVolumeSizeInBytes();
start();
DownloadCommand dcmd = new
DownloadCommand((VolumeObjectTO)(volume.getTO()), maxVolumeSizeInBytes,
checkSum, url, format);
- dcmd.setProxy(getHttpProxy());
+ DataStore cacheStore = cacheManager.getCacheStorage(store.getScope());
+
dcmd.setCacheStore(cacheStore.getTO());dcmd.setProxy(getHttpProxy());
Review comment:
fix formatting here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]