matheusfontes commented on issue #6717:
URL: https://github.com/apache/cloudstack/issues/6717#issuecomment-1245952674
Apparently these 2 lines in UsageManagerImpl.java solves the usage volumes
problem.
But I think there is a problem with firewall rules and lb usage also.
--- ./usage/src/main/java/com/cloud/usage/UsageManagerImpl.java
2022-07-15 09:48:40.000000000 -0300
+++
../../cloudstack-4.17.0.1/./usage/src/main/java/com/cloud/usage/UsageManagerImpl.java
2022-09-13 17:09:36.371193594 -0300
@@ -1458,7 +1458,7 @@
if (EventTypes.EVENT_VOLUME_CREATE.equals(event.getType()) ||
EventTypes.EVENT_VOLUME_RESIZE.equals(event.getType())) {
SearchCriteria<UsageVolumeVO> sc =
_usageVolumeDao.createSearchCriteria();
sc.addAnd("accountId", SearchCriteria.Op.EQ,
event.getAccountId());
- sc.addAnd("id", SearchCriteria.Op.EQ, volId);
+ sc.addAnd("volumeId", SearchCriteria.Op.EQ, volId);
sc.addAnd("deleted", SearchCriteria.Op.NULL);
List<UsageVolumeVO> volumesVOs = _usageVolumeDao.search(sc,
null);
if (volumesVOs.size() > 0) {
@@ -1482,7 +1482,7 @@
} else if (EventTypes.EVENT_VOLUME_DELETE.equals(event.getType())) {
SearchCriteria<UsageVolumeVO> sc =
_usageVolumeDao.createSearchCriteria();
sc.addAnd("accountId", SearchCriteria.Op.EQ,
event.getAccountId());
- sc.addAnd("id", SearchCriteria.Op.EQ, volId);
+ sc.addAnd("volumeId", SearchCriteria.Op.EQ, volId);
sc.addAnd("deleted", SearchCriteria.Op.NULL);
List<UsageVolumeVO> volumesVOs = _usageVolumeDao.search(sc,
null);
if (volumesVOs.size() > 1) {
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]