Skip to content

Allow multiple protocols in protocol listener health check (backport #13871) #13874

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

Merged
merged 2 commits into from
May 8, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented May 8, 2025

Proposed Changes

This covers the optional part of #13782: updating GET /api/health/checks/protocol-listener/{protocol} to accept multiple protocols, comma-separated. The check only returns 200 OK when all of the request protocols have listeners available.

Connects #13782.

Types of Changes

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

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

NOTE: the field in the error response missing is updated to a list. I'm not sure if we should consider this as a breaking change or not.

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)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

Further Comments

This PR also adds a commit which changes the helper used to look for active listeners from rabbit_networking:active_listeners/0 to rabbit_networking:node_listeners(node()) - this eliminates some unnecessary RPC calls. It's unrelated to the feature part of this change.


This is an automatic backport of pull request #13871 done by Mergify.

This is a minor change that avoids a cluster-wide query for active
listeners. The old code called `rabbit_networking:active_listeners/0`
and then filtered the results by ones available on the local node. This
caused an RPC and concatenation of all other cluster members' listeners
and then in the next line filtered down to local nodes. Equivalently we
can use `rabbit_networking:node_listeners(node())` which dumps a local
ETS table.

This is not a very impactful change but it's nice to keep the latency of
the health-check handlers low and reduce some unnecessary cluster noise.

(cherry picked from commit 0d692fa)
This updates the health check for protocol listeners to accept a set of
protocols, comma-separated. The check only returns 200 OK when all
requested protocols have active listeners.

(cherry picked from commit 5d319be)
@michaelklishin michaelklishin added this to the 4.1.1 milestone May 8, 2025
@michaelklishin michaelklishin merged commit 7fa8fd9 into v4.1.x May 8, 2025
271 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.1.x/pr-13871 branch May 8, 2025 17:45
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy