-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
Quota
CLOUDSTACK VERSION
master branch
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
cloudstack/framework/quota/src/main/java/org/apache/cloudstack/quota/QuotaManagerImpl.java
Line 101 in 1d05fea
| String aggregationRange = configs.get("usage.stats.job.aggregation.range"); |
The default value of
usage.stats.job.aggregation.range is 1440._aggregationDuration = Integer.parseInt(aggregationRange);
cloudstack/framework/quota/src/main/java/org/apache/cloudstack/quota/QuotaManagerImpl.java
Line 142 in 1d05fea
| BigDecimal aggregationRatio = new BigDecimal(_aggregationDuration).divide(s_minutesInMonth, 8, RoundingMode.HALF_EVEN); |
The value of
aggregationRatio calculated is 1440/(30 * 24 * 60).
All updateQuota* functions have the bug below.
cloudstack/framework/quota/src/main/java/org/apache/cloudstack/quota/QuotaManagerImpl.java
Line 436 in 1d05fea
| onehourcost = tariff.getCurrencyValue().multiply(aggregationRatio); |
This line would be one-day-cost not one-hour-cost.
So the
aggregationRatio should be fixed with 1/(30 * 24).