rabbitmq / rabbitmq-cli

Command line tools for RabbitMQ
Other
105 stars 34 forks source link

Handle offline remote node in rename_cluster_node #458

Closed lukebakken closed 4 years ago

lukebakken commented 4 years ago

If the value for mnesia_dir or feature_flags_file comes back undefined we need to try again in offline mode.

457

lukebakken commented 4 years ago

@dumbbell this appears to fix the issue. If you're testing the fix using deps/rabbitmq_server_release/sbin/rabbitmqctl in the umbrella, you'll have to set an env var:

RABBITMQ_MNESIA_BASE="/tmp/rabbitmq-test-instances/rabbit@shostakovich/mnesia" ./sbin/rabbitmqctl rename_cluster_node rabbit@shostakovich rabbit@rabbit_fixedhost
lukebakken commented 4 years ago

Great I forgot to run the tests 🙄 that reminds me to look into how rename_cluster_node is tested anyway.

dumbbell commented 4 years ago

I pushed fixes to the testsuite. By fixes, I mean I removed assertions testing the old behavior. The other failures I had were unrelated (testcases not cleaning up their changes, which meant the testsuite couldn't be executed twice in a row, and Elixir compiler crashing).

In another commit, I updated the Travis configuration so we get relevant feedback from CI.

lukebakken commented 4 years ago

OK I was just about to push my changes :stuck_out_tongue:

dumbbell commented 4 years ago

I believe the change is ready. What do you think?

lukebakken commented 4 years ago

Yep! I'll get it. I just had some food.

lukebakken commented 4 years ago

Backported to v3.8.x

lukebakken commented 4 years ago

I built a generic-unix package and verified this fix - rabbitmq_server-3.8.0+rc.1.60.g7dabdd1. I did so because of this follow-up message: https://groups.google.com/d/msg/rabbitmq-users/LZCh9n-LuZM/pMMA8BchCwAJ

I'm going to test to see if my workaround can actually work for this user.