cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject git commit: updated refs/heads/master to 4e823e3
Date Wed, 03 Jul 2013 13:02:15 GMT
Updated Branches:
  refs/heads/master 5396dfa55 -> 4e823e3a3


Workaround for NPE

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4e823e3a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4e823e3a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4e823e3a

Branch: refs/heads/master
Commit: 4e823e3a3e0c571de10e2675107da52fbc0b9eff
Parents: 5396dfa
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Wed Jul 3 09:58:12 2013 +0200
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Wed Jul 3 14:59:03 2013 +0200

----------------------------------------------------------------------
 server/src/com/cloud/storage/StorageManagerImpl.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e823e3a/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 6499e49..9ddcb78 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -1522,7 +1522,13 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
         }
 
         long futureIops = currentIops + requestedIops;
-
+        
+        // getCapacityIops returns a Long so we need to check for null
+        if (pool.getCapacityIops() == null) {
+            s_logger.warn("Storage pool " + pool.getName() + " (" + pool.getId() + ") does
not supply Iops capacity, assuming enough capacity");
+            return true;
+        }
+        
         return futureIops <= pool.getCapacityIops();
     }
 


Mime
View raw message