cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject git commit: updated refs/heads/4.2 to 285f173
Date Mon, 15 Jul 2013 10:01:32 GMT
Updated Branches:
  refs/heads/4.2 564c30a04 -> 285f17326


CLOUDSTACK-3445: Observing the system alerts "unallocated Local Storage is low in cluster"
when Primary storage is Local Storage
Available bytes was getting stored in the used bytes property of local storage pools. As a
result of this, for newly added local pools Cloudstack thinks that there is no space available
and generated alerts.


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

Branch: refs/heads/4.2
Commit: 285f173262326cf583f9bbb3a199a914b28aa8a4
Parents: 564c30a
Author: Koushik Das <koushik.das@citrix.com>
Authored: Mon Jul 15 15:20:28 2013 +0530
Committer: Koushik Das <koushik.das@citrix.com>
Committed: Mon Jul 15 15:30:45 2013 +0530

----------------------------------------------------------------------
 .../apache/cloudstack/storage/datastore/db/StoragePoolVO.java    | 4 ++--
 .../storage/volume/datastore/PrimaryDataStoreHelper.java         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/285f1732/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
index a8c1e7f..941b952 100644
--- a/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
+++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
@@ -203,8 +203,8 @@ public class StoragePoolVO implements StoragePool {
         return capacityBytes;
     }
 
-    public void setUsedBytes(long available) {
-        usedBytes = available;
+    public void setUsedBytes(long usedBytes) {
+        this.usedBytes = usedBytes;
     }
 
     public void setCapacityBytes(long capacityBytes) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/285f1732/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
index 53ead0b..4ea4cee 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
@@ -113,7 +113,7 @@ public class PrimaryDataStoreHelper {
 
         StoragePoolVO pool = this.dataStoreDao.findById(store.getId());
         pool.setScope(scope.getScopeType());
-        pool.setUsedBytes(existingInfo.getAvailableBytes());
+        pool.setUsedBytes(existingInfo.getCapacityBytes() - existingInfo.getAvailableBytes());
         pool.setCapacityBytes(existingInfo.getCapacityBytes());
         pool.setStatus(StoragePoolStatus.Up);
         this.dataStoreDao.update(pool.getId(), pool);


Mime
View raw message