You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2014/06/05 11:45:05 UTC
[1/2] git commit: updated refs/heads/4.4-forward to d59cc1f
Repository: cloudstack
Updated Branches:
refs/heads/4.4-forward 025c143ac -> d59cc1ff8
CLOUDSTACK-6831 [Hyper-V] Improve the logging for VM snapshot failures as it is not supported. Right now it is throwing NPEs
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d59cc1ff
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d59cc1ff
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d59cc1ff
Branch: refs/heads/4.4-forward
Commit: d59cc1ff8fa909d37609410e19142b158cecb2f3
Parents: 945e879
Author: Rajesh Battala <ra...@citrix.com>
Authored: Thu Jun 5 15:06:11 2014 +0530
Committer: Rajesh Battala <ra...@citrix.com>
Committed: Thu Jun 5 15:06:24 2014 +0530
----------------------------------------------------------------------
.../cloud/hypervisor/dao/HypervisorCapabilitiesDaoImpl.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d59cc1ff/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;
+ }
}
}
[2/2] git commit: updated refs/heads/4.4-forward to d59cc1f
Posted by ra...@apache.org.
CLOUDSTACK-6833 [Hyper-V] Volume snapshot creation returns success even though snapshots are not supported for Hyper-V
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/945e879b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/945e879b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/945e879b
Branch: refs/heads/4.4-forward
Commit: 945e879bf221454cd42f1e7ef0a46e9a4aa6a156
Parents: 025c143
Author: Rajesh Battala <ra...@citrix.com>
Authored: Thu Jun 5 12:01:43 2014 +0530
Committer: Rajesh Battala <ra...@citrix.com>
Committed: Thu Jun 5 15:06:24 2014 +0530
----------------------------------------------------------------------
server/src/com/cloud/storage/VolumeApiServiceImpl.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/945e879b/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();