SadiJr opened a new pull request #5901: URL: https://github.com/apache/cloudstack/pull/5901
### Description When deleting a volume in `allocated` state, via API deleteVolume, no Usage event is generated, which causes an inconsistency in the Usage Server. Therefore, the volume appears as never deleted/destroyed. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ### Feature/Enhancement Scale or Bug Severity #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [x] Minor - [ ] Trivial ### How Has This Been Tested? It's tested in a local lab: 1. I created new volumes but I didn't attach them to any VM. 2. I deleted this volumes via API deleteVolume. 3. Before the changes, no usage event was generated and, in the `cloud_usage` DB, the new volumes appears only with the `VOLUME.CREATE` event. No `VOLUME.DELETE` event is handled, which causes the volume to be never "deleted/destroyed" in the usage system. 4. With this PR, when deleting volumes in `allocated` state, the `VOLUME.DELETE` usage event is correctly handled. -- 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]
