JoaoJandre opened a new pull request, #6772: URL: https://github.com/apache/cloudstack/pull/6772
### Description When a volume is removed, ACS inserts a `VOLUME.DELETE` record into the `cloud.usage_event` table. If the volume is removed without the expunge option, it can still be restored. When the volume is restored, ACS does not insert a new record in the `cloud.usage_event` stating that it has been recreated. Thus, the volume continues to be used without being accounted for. This PR adds an event in the volume restore process that indicates the volume was recreated. So it will be accounted for. ### 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 #### Feature/Enhancement Scale - [ ] Major - [X] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [X] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? This PR was tested in a local lab, by destroying and recreating volumes and checking the DB to see if the event was added. Some unit tests were also added. -- 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]
