Skip to content

Conversation

@dumbbell
Copy link
Collaborator

Why

If we run reset again on an already virgin node, it will take decisions based on the wrong state. In particular, the previous use of Khepri or Mnesia is lost with the first reset. Therefore, the second reset wolud delete non-Khepri related files that belong to the coordination Ra system.

This is particularily problematic with the previously documented way of joining two nodes using the CLI:

rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl join_cluster $REMOTE_NODE
rabbitmqctl start_app

Indeed, join_cluster implies a reset. If the admin already reset the node as documented, join_cluster implied reset would delete too many files, breaking Khepri after the join if Khepri is used by the remote node.

How

In rabbit_db:reset/0, we skip the reset if the node is already virgin.

Fixes #14748.

@dumbbell dumbbell added this to the 4.3.0 milestone Oct 21, 2025
@dumbbell dumbbell self-assigned this Oct 21, 2025
@dumbbell dumbbell force-pushed the skip-reset-on-virgin-node branch from d37d8d7 to 74a68ff Compare October 29, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants