winterhazel commented on issue #10687:
URL: https://github.com/apache/cloudstack/issues/10687#issuecomment-2817680846
@DaanHoogland I looked into the network Usage event model. Turns out that I
was somewhat wrong in my previous comment regarding when `NETWORK.CREATE` and
`NETWORK.UPDATE` are published:
- `NETWORK.CREATE` is not published when the network is created. Instead, it
is published after the network is implemented, which does not match what Usage
expects. This is what allows the duplicate `NETWORK.CREATE`s
- `NETWORK.UPDATE` is also published to indicate that the network
transitioned to `Implemented`; however, in a situation that does not make much
sense:
- when the method that implements the network is called after the network
has already been implemented, such as when deploying a second VM on the network
This means that:
- networks that were created, but not implemented, do not generate usage
records
- implemented networks can generate usage records indicating that their
state is `Allocated` in some situations, such as when only a single VM has been
associated with the network
I opened #10755 to fix these, and to track when the network goes from
`Implemented` to `Allocated`, but have not properly tested it yet (will do and
describe the tests tomorrow).
--
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]