SadiJr commented on pull request #5901: URL: https://github.com/apache/cloudstack/pull/5901#issuecomment-1024526857
@DaanHoogland, when a volume is created, ACS generates a record in the table `cloud.usage_event` with the type `VOLUME.CREATE`. This record is synced to the table `cloud_usage.usage_event` and then, from it, ACS generates a record in the table `cloud_usage.usage_volume`. If the record in `cloud_usage.usage_volume` has field `deleted` as null, ACS will generate records in `cloud_usage.cloud_usage`, which means that the resource will be billed. When a volume is deleted, ACS generates a record in the table `cloud.usage_event` with the type `VOLUME.DELETE`, that is synced to the table `cloud_usage.usage_event` and then, from it, ACS mark the record in the table `cloud_usage.usage_volume` as deleted, which will stop the resource's billing. This is the normal flow, however, when a volume in state `allocated` is deleted, it does not generate the record with type `VOLUME.DELETE`. This not happens because, before of executing the code that leads to the right behavior, ACS validates if the state of the volume is not contained by the `Set` `STATES_VOLUME_CANNOT_BE_DESTROYED`. -- 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]
