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 135BF101CD for ; Fri, 12 Jul 2013 07:51:12 +0000 (UTC) Received: (qmail 15591 invoked by uid 500); 12 Jul 2013 07:50:57 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 15513 invoked by uid 500); 12 Jul 2013 07:50:57 -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 15309 invoked by uid 99); 12 Jul 2013 07:50: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, 12 Jul 2013 07:50:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A9B7B894A8B; Fri, 12 Jul 2013 07:50:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sebgoa@apache.org To: commits@cloudstack.apache.org Date: Fri, 12 Jul 2013 07:51:01 -0000 Message-Id: <6bc2d19495ee4fe68ae75de9468496a1@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [06/50] git commit: updated refs/heads/sdnextensions to bcfb4e6 CLOUDSTACK-3301 NPE wile deployVM in kvm Only solidfire type PS is setting/using the capacityIops, This check will fix to return the storage has enough Iops when capacityIops is set to NULL for any PS Storage provider Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7089e1ce Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7089e1ce Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7089e1ce Branch: refs/heads/sdnextensions Commit: 7089e1ce44151702f36a8135e3b74752631a1894 Parents: 7eb3d49 Author: Rajesh Battala Authored: Tue Jul 2 11:56:19 2013 +0530 Committer: Edison Su Committed: Wed Jul 10 14:52:47 2013 -0700 ---------------------------------------------------------------------- server/src/com/cloud/storage/StorageManagerImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7089e1ce/server/src/com/cloud/storage/StorageManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index d9ef853..7378708 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -1499,11 +1499,15 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C if (requestedVolumes == null || requestedVolumes.isEmpty() || pool == null) { return false; } - + // Only Solidfire type primary storage is using/setting Iops. + // This check will fix to return the storage has enough Iops when capacityIops is set to NULL for any PS Storage provider + if (pool.getCapacityIops() == null ) { + return true; + } long currentIops = 0; - List volumesInPool = _volumeDao.findByPoolId(pool.getId(), null); + for (VolumeVO volumeInPool : volumesInPool) { Long minIops = volumeInPool.getMinIops();