Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate dynamic shovels can be started in certain scenarios #3260

Closed
michaelklishin opened this issue Aug 4, 2021 · 2 comments · Fixed by #3263
Closed

Duplicate dynamic shovels can be started in certain scenarios #3260

michaelklishin opened this issue Aug 4, 2021 · 2 comments · Fixed by #3263
Assignees
Milestone

Comments

@michaelklishin
Copy link
Member

michaelklishin commented Aug 4, 2021

Originally reported in #3132 and #3154 that @mkuratczyk and I could reproduce (hopefully reliably) using the Kubernetes cluster Operator.

The steps are:

  • Form cluster S, the source
  • Form cluster D, the destination
  • Configure a Shovel in the D cluster so that it uses an exchange source in cluster S
  • Verify that the shovel is running and functional
  • For every node, put it under maintenance then restart
  • Observe duplicate mirrored supervisor children with rabbitmqctl eval 'mirrored_supervisor:which_children(rabbit_shovel_dyn_worker_sup_sup).'

My testing suggests that just a restart is not enough but putting a node under maintenance mode first at least makes the issue
significantly more likely to resurface. Something like this:

for n in rabbit hare flopsy
do
  rabbitmq-upgrade drain -n $n@hostname
  rabbitmqctl stop_app -n $n@hostname
  rabbitmqctl start_app -n $n@hostname
done
@michaelklishin michaelklishin added this to the 3.8.20 milestone Aug 4, 2021
@michaelklishin michaelklishin self-assigned this Aug 4, 2021
@michaelklishin
Copy link
Member Author

One discovered difference so far is that pg2 used to effectively use global locks for certain operations whereas pg is strongly eventually consistent, which mirrored_supervisor does not expect.

michaelklishin added a commit that referenced this issue Aug 4, 2021
Unlike pg2, pg in Erlang 24 is eventually consistent. So this
reintroduces some of the same kind of locking mirrored_supervisor
used to rely on implicitly via pg2.

Per discussion with @lhoguin.

Closes #3260.

References #3132, #3154.
mergify bot pushed a commit that referenced this issue Aug 5, 2021
Unlike pg2, pg in Erlang 24 is eventually consistent. So this
reintroduces some of the same kind of locking mirrored_supervisor
used to rely on implicitly via pg2.

Per discussion with @lhoguin.

Closes #3260.

References #3132, #3154.

(cherry picked from commit 22add3c)
mergify bot pushed a commit that referenced this issue Aug 5, 2021
Unlike pg2, pg in Erlang 24 is eventually consistent. So this
reintroduces some of the same kind of locking mirrored_supervisor
used to rely on implicitly via pg2.

Per discussion with @lhoguin.

Closes #3260.

References #3132, #3154.

(cherry picked from commit 22add3c)
@michaelklishin
Copy link
Member Author

The milestone says 3.8.20 but #3263 will also ship in 3.9.2.

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 a pull request may close this issue.

1 participant