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 2017/02/17 12:18:41 UTC
[1/2] git commit: updated refs/heads/master to d84347b
Repository: cloudstack
Updated Branches:
refs/heads/master bf2f44121 -> d84347ba8
CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If
the destination pool is in maintenance mode do not allow a volume to be migrated to
the storage pool. Fixed it for volume migration and vm migration with volume.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8ef94819
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8ef94819
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8ef94819
Branch: refs/heads/master
Commit: 8ef94819dabfc7b027d638473e9454e9f73ac49d
Parents: 9513053
Author: Anshul Gangwar <an...@accelerite.com>
Authored: Mon Apr 20 13:13:48 2015 +0530
Committer: Anshul Gangwar <an...@accelerite.com>
Committed: Mon Feb 13 15:29:52 2017 +0530
----------------------------------------------------------------------
server/src/com/cloud/storage/VolumeApiServiceImpl.java | 3 +++
server/src/com/cloud/vm/UserVmManagerImpl.java | 3 +++
2 files changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8ef94819/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 759c7b4..813830e 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1917,6 +1917,9 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
StoragePool destPool = (StoragePool)dataStoreMgr.getDataStore(storagePoolId, DataStoreRole.Primary);
if (destPool == null) {
throw new InvalidParameterValueException("Failed to find the destination storage pool: " + storagePoolId);
+ } else if (destPool.isInMaintenance()) {
+ throw new InvalidParameterValueException("Cannot migrate volume " + vol + "to the destination storage pool " + destPool.getName() +
+ " as the storage pool is in maintenance mode.");
}
if (_volumeMgr.volumeOnSharedStoragePool(vol)) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8ef94819/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index cf58679..b6400fd 100644
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -4983,6 +4983,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
throw new InvalidParameterValueException("There is no volume present with the given id " + entry.getKey());
} else if (pool == null) {
throw new InvalidParameterValueException("There is no storage pool present with the given id " + entry.getValue());
+ } else if (pool.isInMaintenance()) {
+ throw new InvalidParameterValueException("Cannot migrate volume " + volume + "to the destination storage pool " + pool.getName() +
+ " as the storage pool is in maintenance mode.");
} else {
// Verify the volume given belongs to the vm.
if (!vmVolumes.contains(volume)) {
[2/2] git commit: updated refs/heads/master to d84347b
Posted by ra...@apache.org.
Merge pull request #1838 from anshul1886/CLOUDSTACK-9682
CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If
the destination pool is in maintenance mode do not allow a volume to be migrated to
the storage pool. Fixed it for volume migration and vm migration with volume.
* pr/1838:
CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If the destination pool is in maintenance mode do not allow a volume to be migrated to the storage pool. Fixed it for volume migration and vm migration with volume.
Signed-off-by: Rajani Karuturi <ra...@accelerite.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d84347ba
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d84347ba
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d84347ba
Branch: refs/heads/master
Commit: d84347ba8c623293d14ed50fb3c6e06f1fefbd28
Parents: bf2f441 8ef9481
Author: Rajani Karuturi <ra...@accelerite.com>
Authored: Fri Feb 17 17:48:32 2017 +0530
Committer: Rajani Karuturi <ra...@accelerite.com>
Committed: Fri Feb 17 17:48:32 2017 +0530
----------------------------------------------------------------------
server/src/com/cloud/storage/VolumeApiServiceImpl.java | 3 +++
server/src/com/cloud/vm/UserVmManagerImpl.java | 3 +++
2 files changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d84347ba/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d84347ba/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/vm/UserVmManagerImpl.java
index f7449e7,b6400fd..fcd2d8c
mode 100755,100644..100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java