Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE14B11328 for ; Fri, 27 Jun 2014 15:49:56 +0000 (UTC) Received: (qmail 30382 invoked by uid 500); 27 Jun 2014 15:49:56 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 30355 invoked by uid 500); 27 Jun 2014 15:49:56 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 30346 invoked by uid 99); 27 Jun 2014 15:49:56 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 15:49:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 295B398F109; Fri, 27 Jun 2014 15:49:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dahn@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/4.4-forward to 7959c1f Date: Fri, 27 Jun 2014 15:49:56 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/4.4-forward 75aa243d1 -> 7959c1faf Revert "CLOUDSTACK-6935 refactor StoragePoolAllocator#filter logic" This reverts commit 45f0c7367680f4bfbcee470139b708d69322be78. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7959c1fa Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7959c1fa Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7959c1fa Branch: refs/heads/4.4-forward Commit: 7959c1faf0828c0974de6d891d7685c2916122d7 Parents: 75aa243 Author: Daan Hoogland Authored: Fri Jun 27 17:49:33 2014 +0200 Committer: Daan Hoogland Committed: Fri Jun 27 17:49:33 2014 +0200 ---------------------------------------------------------------------- .../storage/allocator/AbstractStoragePoolAllocator.java | 2 +- .../storage/allocator/ZoneWideStoragePoolAllocator.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7959c1fa/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 847bad3..894b4d4 100755 --- a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java @@ -191,6 +191,6 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement Volume volume = _volumeDao.findById(dskCh.getVolumeId()); List requestVolumes = new ArrayList(); 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/7959c1fa/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 f9abfde..8fb9c8d 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java @@ -34,6 +34,7 @@ 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; @@ -46,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 requestVolumes = new ArrayList(); + requestVolumes.add(volume); + + return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool); + } @Override protected List select(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {