Skip to content

Conversation

@the-mikedavis
Copy link
Collaborator

#6430 caused some subtle regressions in the events sent through rabbit_event:notify/2 when deleting a vhost. These notifications were thunks that mnesia transactions returned but that was refactored in #6430 to be explicit calls for most callers. Runtime parameters and permissions also need some changes so that they send notifications when deleted.

I've also added the vhost name to the rabbit_vhost_limit notifications for testing purposes but it should be useful anyways.

@the-mikedavis the-mikedavis self-assigned this Apr 24, 2024
@the-mikedavis the-mikedavis force-pushed the md/vhost-notify-deletions branch 3 times, most recently from d36e292 to 2143108 Compare April 24, 2024 21:24
These changes to the defaults can affect other test cases. In particular
it will affect the time to live and deletion events in the vhost
deletion idempotency case.
@the-mikedavis the-mikedavis force-pushed the md/vhost-notify-deletions branch from 2143108 to d4584a3 Compare April 25, 2024 14:26
Previously `rabbit_vhost:delete/2` threw this error within
`rabbit_policy:list/2` when the vhost didn't exist. We can return the
value instead so that `rabbitmqctl delete_vhost` behaves the same
between these changes and the branch fork point.

The `rabbit_vhost_sup_sup:delete_on_all_nodes/1` cleanup is idempotent so
we can run all teardown steps for the vhost and return this error
instead. This might be useful if deletion fails for some resources
under the vhost, for example a queue. If the vhost record is gone it
might still be useful to try to clean up the vhost's resources.
@the-mikedavis the-mikedavis force-pushed the md/vhost-notify-deletions branch from d4584a3 to 39c6093 Compare April 25, 2024 15:21
@the-mikedavis the-mikedavis marked this pull request as ready for review April 25, 2024 15:55
@michaelklishin michaelklishin merged commit 2ccf0c9 into main Apr 26, 2024
@michaelklishin michaelklishin deleted the md/vhost-notify-deletions branch April 26, 2024 23:46
michaelklishin added a commit that referenced this pull request Apr 27, 2024
Notify of permission and parameter deletions when deleting a vhost (backport #11077)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants