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/05 14:36:37 UTC

[1/2] git commit: updated refs/heads/4.4 to 073928f

Repository: cloudstack
Updated Branches:
  refs/heads/4.4 91391e677 -> 073928fef


CLOUDSTACK-6833 [Hyper-V] Volume snapshot creation returns success even though snapshots are not supported for Hyper-V

(cherry picked from commit 945e879bf221454cd42f1e7ef0a46e9a4aa6a156)


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

Branch: refs/heads/4.4
Commit: 1f7d2ee091992b7b6977c92940a1e93bf5f25643
Parents: 91391e6
Author: Rajesh Battala <ra...@citrix.com>
Authored: Thu Jun 5 12:01:43 2014 +0530
Committer: Daan Hoogland <da...@onecht.net>
Committed: Thu Jun 5 12:21:14 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f7d2ee0/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 42d318c..6703e61 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1662,6 +1662,9 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
         if (volume.getInstanceId() != null)
             vm = _vmInstanceDao.findById(volume.getInstanceId());
 
+        if (volume.getHypervisorType() == HypervisorType.Hyperv) {
+            throw new InvalidParameterValueException("Volume Snapshots are not supported on Hypervisor Type : Hyper-V");
+        }
         if (vm != null) {
             // serialize VM operation
             AsyncJobExecutionContext jobContext = AsyncJobExecutionContext.getCurrentExecutionContext();


[2/2] git commit: updated refs/heads/4.4 to 073928f

Posted by da...@apache.org.
CLOUDSTACK-6831 [Hyper-V] Improve the logging for VM snapshot failures as it is not supported. Right now it is throwing NPEs

(cherry picked from commit d59cc1ff8fa909d37609410e19142b158cecb2f3)


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

Branch: refs/heads/4.4
Commit: 073928fef5b9f3562f9333143cd69ed4a4113699
Parents: 1f7d2ee
Author: Rajesh Battala <ra...@citrix.com>
Authored: Thu Jun 5 15:06:11 2014 +0530
Committer: Daan Hoogland <da...@onecht.net>
Committed: Thu Jun 5 14:36:17 2014 +0200

----------------------------------------------------------------------
 .../cloud/hypervisor/dao/HypervisorCapabilitiesDaoImpl.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/073928fe/engine/schema/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDaoImpl.java b/engine/schema/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDaoImpl.java
index 2b94e69..e83a4ad 100644
--- a/engine/schema/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDaoImpl.java
+++ b/engine/schema/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDaoImpl.java
@@ -101,6 +101,12 @@ public class HypervisorCapabilitiesDaoImpl extends GenericDaoBase<HypervisorCapa
     @Override
     public Boolean isVmSnapshotEnabled(HypervisorType hypervisorType, String hypervisorVersion) {
         HypervisorCapabilitiesVO result = getCapabilities(hypervisorType, hypervisorVersion);
-        return result.getVmSnapshotEnabled();
+        // if default capability profile not present for any hypervisor type result will be null.
+        // So returning vm snapshot not supported if there is no default capability profile for hypervisor.
+        if (result != null) {
+            return result.getVmSnapshotEnabled();
+        } else {
+            return false;
+        }
     }
 }