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/19 09:42:03 UTC
git commit: updated refs/heads/4.4 to 99dd86e
Repository: cloudstack
Updated Branches:
refs/heads/4.4 335f165b5 -> 99dd86e58
CLOUDSTACK-6935 refactor StoragePoolAllocator#filter logic
to support IOPS capacity control in a cluster wide storage pool and a
local storage pool
to enable hypervisor type check, storage type check for root volume and
avoid list check
Since original commit(31de58edab563eb1cb50c5c06437fdd3efc6a3d2) contained
a bug, it was reverted and this commit is a revised one.
(cherry picked from commit 45f0c7367680f4bfbcee470139b708d69322be78)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/99dd86e5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/99dd86e5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/99dd86e5
Branch: refs/heads/4.4
Commit: 99dd86e588fd28dedd5fb3b830297a8a4f885760
Parents: 335f165
Author: ynojima <ma...@ynojima.net>
Authored: Wed Jun 18 13:11:55 2014 -0600
Committer: Daan Hoogland <da...@onecht.net>
Committed: Thu Jun 19 09:41:47 2014 +0200
----------------------------------------------------------------------
.../storage/allocator/AbstractStoragePoolAllocator.java | 2 +-
.../storage/allocator/ZoneWideStoragePoolAllocator.java | 9 ---------
2 files changed, 1 insertion(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99dd86e5/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 ddbb5a4..2d958a6 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.storagePoolHasEnoughSpace(requestVolumes, pool);
+ return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99dd86e5/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 8fb9c8d..f9abfde 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
@@ -34,7 +34,6 @@ import com.cloud.deploy.DeploymentPlan;
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.storage.StoragePool;
-import com.cloud.storage.Volume;
import com.cloud.user.Account;
import com.cloud.vm.DiskProfile;
import com.cloud.vm.VirtualMachineProfile;
@@ -47,14 +46,6 @@ 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) {