@ddstreet asked me to take a look.
Step-by-step reproducer:
Set up a 2 node rabbitmq cluster using virtual machines.
Make the hostnames rabbitmq1 and rabbitmq2.
Add each host to /etc/hosts in each vm.
Create the cluster:
1) On both hosts: sudo apt install rabbitmq-server
2) On host 1, copy the string in /var/lib/rabbitmq/.erlang.cookie and place it
in /var/lib/rabbitmq/.erlang.cookie on host 2.
3) On host 2, restart the rabbitmq service: sudo systemctl restart
rabbitmq-server
4) On host 2, stop the server: sudo rabbitmqctl stop_app
5) On host 2: sudo rabbitmqctl reset
6) On host 2: sudo rabbitmqctl join_cluster rabbit@rabbitmq1
7) On host 2: sudo rabbitmqctl start_app
8) On host 1: sudo rabbitmqctl cluster_status
You should see both rabbit hosts in the cluster.
Set up the queues:
On host 1:
1) sudo rabbitmqctl add_user tester linux
2) sudo rabbitmqctl add_vhost tester
3) sudo rabbitmqctl set_permissions -p tester tester ".*" ".*" ".*"
4) sudo rabbitmqctl set_policy -p tester HA ".*" '{"ha-mode": "all"}'
5) sudo rabbitmqctl list_permissions -p tester
6) sudo rabbitmqctl list_policies -p tester
On VM host:
1) git clone https://github.com/nicolasbock/rabbitmq-test.git
2) virtualenv venv
3) . venv/bin/activate
4) pip install -r requirements.txt
5) python setup.py install
6) ./test-rabbit.py <host 1 IP addr> --send 'message 1'
7) ./test-rabbit.py <host 1 IP addr> --list
On host 1:
1) sudo rabbitmqctl list_queues -p tester name pid slave_pids
Listing queues
test_queue <[email protected]> [<[email protected]>]
In my case, rabbitmq1 is the primary owner of the queue denoted with <>,
with rabbitmq2 being a slave, denoted with [].
We want to shut down the primary host, so the slave gets promoted to
being primary.
Shut down rabbitmq1.
On host 2, confirm it has become primary with:
1) sudo rabbitmqctl list_queues -p tester name pid slave_pids
Listing queues
test_queue <[email protected]> []
Send a new message, to push the queue ahead of what rabbitmq1 currently
knows about.
On VM host:
1) ./test-rabbit.py <host 2 IP addr> --send 'message 2'
2) ./test-rabbit.py <host2 IP addr> --list
Shut rabbitmq2 down, so all VMs are off.
Attempt to boot rabbitmq1 now. rabbitmq1 will assume it is behind, and
needs to wait for rabbitmq2 to come online before we continue. This is
where the issue occurs. Check the status of rabbitmq-server.service on
rabbitmq1.
1) sudo systemctl status rabbitmq-server.service
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874075
Title:
rabbitmq-server startup timeouts differ between SysV and systemd
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/1874075/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs