You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by yn...@apache.org on 2014/06/18 21:10:01 UTC
git commit: updated refs/heads/4.4-forward to a61f775
Repository: cloudstack
Updated Branches:
refs/heads/4.4-forward cd414a0f5 -> a61f77523
Revert "CLOUDSTACK-6935 refactor StoragePoolAllocator#filter logic"
This reverts commit cd414a0f56798ae801fc464be127e37daabef809.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a61f7752
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a61f7752
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a61f7752
Branch: refs/heads/4.4-forward
Commit: a61f77523dd70ebf54e577426fe2535e4359cc25
Parents: cd414a0
Author: ynojima <ma...@ynojima.net>
Authored: Wed Jun 18 13:09:17 2014 -0600
Committer: ynojima <ma...@ynojima.net>
Committed: Wed Jun 18 13:09:17 2014 -0600
----------------------------------------------------------------------
.../storage/allocator/AbstractStoragePoolAllocator.java | 2 +-
.../storage/allocator/ZoneWideStoragePoolAllocator.java | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a61f7752/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
index 2d958a6..ddbb5a4 100755
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
@@ -183,6 +183,6 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
Volume volume = _volumeDao.findById(dskCh.getVolumeId());
List<Volume> requestVolumes = new ArrayList<Volume>();
requestVolumes.add(volume);
- return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
+ return storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a61f7752/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
index c629906..8fb9c8d 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
@@ -47,6 +47,14 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator {
@Inject
DataStoreManager dataStoreMgr;
+ @Override
+ protected boolean filter(ExcludeList avoid, StoragePool pool, DiskProfile dskCh, DeploymentPlan plan) {
+ Volume volume = _volumeDao.findById(dskCh.getVolumeId());
+ List<Volume> requestVolumes = new ArrayList<Volume>();
+ requestVolumes.add(volume);
+
+ return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
+ }
@Override
protected List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {