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

[#548] Specify output formatting when getting cluster_status on RabbitMQ 3.8 #560

Conversation

decoyjoe
Copy link
Contributor

Proposed Changes

Fixes #548

Default rabbitmqctl output formatting changed to "table" in RabbitMQ 3.8
Need to explicitly specify "erlang" formatting when getting
cluster_status in order to properly parse output.

Fixes non-idempotency of rabbitmq::cluster recipe on RabbitMQ 3.8.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Fixes rabbitmq#548

Default rabbitmqctl output formatting changed to "table" in RabbitMQ 3.8
Need to explicitly specify "erlang" formatting when getting
cluster_status in order to properly parse output.
@michaelklishin
Copy link
Member

While it's true that default (meant for interactive use) format of rabbitmq-diagnostics cluster_status has changed in 3.8, it is not "table" but "string". Anyhow, this change is something we can consider.

A better option would be to use --formatter=json and parse JSON, something that's been available since 3.7.0 (and this cookbook doesn't have to worry about 3.6.x since it's been out of support for over two years now). How does this sound?

@decoyjoe
Copy link
Contributor Author

The current cluster_status parsing logic works fine so I didn't see a need for a refactor to JSON formatting, just a simple change to get it working under RabbitMQ 3.8.

Has this cookbook already dropped support for 3.6.x? If so, I can take a stab at updating the cluster status logic to use --formatter=json instead.

@michaelklishin
Copy link
Member

3.6.x has been out of any kind of support for more than two years but yeah, we have never really announced that it's support has been dropped in v5.x. Fair enough, we can continue parsing the Erlang format.

@michaelklishin michaelklishin merged commit 6f5a69a into rabbitmq:v5.x Jul 14, 2020
@michaelklishin
Copy link
Member

Thank you!

@decoyjoe
Copy link
Contributor Author

Thanks @michaelklishin. Any idea when this change might be released? This bug is currently affecting us in all environments.

@michaelklishin
Copy link
Member

@decoyjoe shouldn't take long but unfortunately, CI is affected by something I cannot explain, and it is fairly distracting. I will likely run all suites locally with Dokken and then cut a release. I suggest that you consume this cookbook via git, from the v5.x branch for now.

@michaelklishin
Copy link
Member

5.8.5 is up in Chef Supermarket.

@michaelklishin michaelklishin added this to the 5.8.5 milestone Jul 25, 2020
@decoyjoe
Copy link
Contributor Author

@michaelklishin Fantastic, thanks!

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.

rabbitmq 3.8 new cluster_status cli output breaks cluster resource
2 participants