You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/06/13 12:41:46 UTC

[4/4] git commit: updated refs/heads/4.4 to a951b51

CLOUDSTACK-6865 , CLOUDSTACK-6868: [hyperv] while attaching the volume we were changing the volume's Image format to hypervisor's default Image format, hence it was failing to find the volume with vhdx format. Now changed the behavior to set Image Format for volume only when it is not set

(cherry picked from commit ebff469b46551f8613013e80aa0386203a9c7912)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a951b515
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a951b515
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a951b515

Branch: refs/heads/4.4
Commit: a951b51523069e72e5cd1e503df11b9370b6d6d8
Parents: 2c5f352
Author: Anshul Gangwar <an...@citrix.com>
Authored: Tue Jun 10 16:28:32 2014 +0530
Committer: Daan Hoogland <da...@onecht.net>
Committed: Fri Jun 13 12:41:18 2014 +0200

----------------------------------------------------------------------
 .../cloudstack/engine/orchestration/VolumeOrchestrator.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a951b515/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
index b6fecfb..358b3bd 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
@@ -746,7 +746,9 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
             throw new CloudRuntimeException("Volume shouldn't be null " + volume.getId());
         }
         VolumeVO volVO = _volsDao.findById(vol.getId());
-        volVO.setFormat(getSupportedImageFormatForCluster(rootDiskHyperType));
+        if (volVO.getFormat() == null) {
+            volVO.setFormat(getSupportedImageFormatForCluster(rootDiskHyperType));
+        }
         _volsDao.update(volVO.getId(), volVO);
         return volFactory.getVolume(volVO.getId());
     }