mirror of https://github.com/apache/cloudstack.git
Merging 2.1.8 fix to master : Bug 8801 - reserve some space for snapshots
StoragePoolAllocators need to respect storage.capacity.threshold in allocations - this was broken after StatsCollector started maintaining the primary storage Stats separately Fixed allocator to refer the correct in-memory stats map.
This commit is contained in:
parent
a0d79bda91
commit
34836aaaa5
|
|
@ -186,7 +186,10 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
|
|||
// capacity check "storage.capacity.threshold"
|
||||
if (sc != null) {
|
||||
long totalSize = pool.getCapacityBytes();
|
||||
StorageStats stats = sc.getStorageStats(pool.getId());
|
||||
StorageStats stats = sc.getStoragePoolStats(pool.getId());
|
||||
if(stats == null){
|
||||
stats = sc.getStorageStats(pool.getId());
|
||||
}
|
||||
if (stats != null) {
|
||||
double usedPercentage = ((double)stats.getByteUsed() / (double)totalSize);
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue