Skip to content

Commit 5328528

Browse files
Add debug logging when storage pool has insufficient IOPS capacity (#13579)
Co-authored-by: mprokopchuk <mprokopchuk@apple.com>
1 parent 0339f31 commit 5328528

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

server/src/main/java/com/cloud/storage/StorageManagerImpl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3492,7 +3492,13 @@ protected boolean storagePoolHasEnoughIops(long requestedIops, List<Pair<Volume,
34923492
long futureIops = currentIops + requestedIops;
34933493
boolean hasEnoughIops = futureIops <= pool.getCapacityIops();
34943494
String hasCapacity = hasEnoughIops ? "has" : "does not have";
3495-
logger.debug(String.format("Pool [%s] %s enough IOPS to allocate volumes [%s].", pool, hasCapacity, requestedVolumes));
3495+
StringBuilder stringBuilder = new StringBuilder();
3496+
stringBuilder.append(String.format("Pool [%s] %s enough IOPS to allocate volumes [%s]", pool, hasCapacity, requestedVolumes));
3497+
if (!hasEnoughIops) {
3498+
stringBuilder.append(String.format(" - Insufficient un-allocated IOPS for storage allocation: " +
3499+
"capacityIops : %d, usedIops : %d, requestedIops : %d", pool.getCapacityIops(), currentIops, requestedIops));
3500+
}
3501+
logger.debug(stringBuilder.toString());
34963502
return hasEnoughIops;
34973503
}
34983504

0 commit comments

Comments
 (0)