You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/src/main/java/com/cloud/resourcelimit/CheckedReservation.java
+3-7Lines changed: 3 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -63,17 +63,13 @@ public CheckedReservation(Account account, ResourceType resourceType, Long amoun
63
63
this.amount = amount;
64
64
this.reservation = null;
65
65
setGlobalLock(account, resourceType);
66
-
if (this.amount != null && this.amount <= 0) {
67
-
if(LOG.isDebugEnabled()){
68
-
LOG.debug(String.format("not reserving no amount of resources for %s in domain %d, type: %s, %s ", account.getAccountName(), account.getDomainId(), resourceType, amount));
if (!updateResourceCountForAccount(accountId, type, false, numToDecrement)) {
210
+
_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_UPDATE_RESOURCE_COUNT, 0L, 0L, "Failed to decrement resource count of type " + type + " for account id=" + accountId,
211
+
"Failed to decrement resource count of type " + type + " for account id=" + accountId + "; use updateResourceCount API to recalculate/fix the problem");
212
+
}
213
+
}
214
+
});
215
+
}
216
+
200
217
@Override
201
218
publicbooleanstart() {
202
219
if (_resourceCountCheckInterval > 0) {
@@ -307,10 +324,7 @@ public void decrementResourceCount(long accountId, ResourceType type, Long... de
if (!updateResourceCountForAccount(accountId, type, false, numToDecrement)) {
311
-
_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_UPDATE_RESOURCE_COUNT, 0L, 0L, "Failed to decrement resource count of type " + type + " for account id=" + accountId,
312
-
"Failed to decrement resource count of type " + type + " for account id=" + accountId + "; use updateResourceCount API to recalculate/fix the problem");
0 commit comments