8000 fix(callback): perform callback resolution within registration loop by andrewazores · Pull Request #635 · cryostatio/cryostat-agent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(callback): perform callback resolution within registration loop #635

10000
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 10 commits into from
Apr 23, 2025

Conversation

andrewazores
Copy link
Member
@andrewazores andrewazores commented Apr 23, 2025

Fixes #634

Refactors the callback URI resolution from a one-time startup operation (which is always expected to pass, or else startup bails) to a repeatable operation that is done at the beginning of the registration loop. If the DNS resolution fails then the registration loop fails and will repeat on schedule. This accommodates for cases where the Agent (or its host JVM, or the container they're in) may not be able to resolve its own DNS address early in the startup sequence, for example when there are Kubernetes liveness/readiness probes that must first pass before the Pod can be DNS resolved.

2025-04-23 16:11:46:472 +0000 [cryostat-agent-main] INFO io.cryostat.agent.Registration - io.cryostat.agent.Registration started
2025-04-23 16:11:46:472 +0000 [cryostat-agent-registration] DEBUG io.cryostat.agent.CallbackResolver - Attempting to resolve quarkus-cryostat-agent
2025-04-23 16:11:46:472 +0000 [cryostat-agent-registration] DEBUG io.cryostat.agent.CallbackResolver - Resolved quarkus-cryostat-agent to 10.89.11.90
2025-04-23 16:11:46:473 +0000 [cryostat-agent-registration] DEBUG io.cryostat.agent.CallbackResolver - Using https://quarkus-cryostat-agent:9977 as callback

@andrewazores andrewazores marked this pull request as draft April 23, 2025 16:03
@andrewazores andrewazores marked this pull request as ready for review April 23, 2025 16:16
@andrewazores andrewazores requested a review from ebaron April 23, 2025 16:17
ebaron
ebaron previously approved these changes Apr 23, 2025
Copy link
Member
@ebaron ebaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the bug for me, thanks! Just one whitespace issue below.

Uh oh!

There was an error while loading. Please reload this page.

@andrewazores andrewazores merged commit 74d96a4 into cryostatio:main Apr 23, 2025
9 checks passed
@andrewazores andrewazores deleted the dns-resolve-loop branch April 23, 2025 17:55
mergify bot pushed a commit that referenced this pull request Apr 23, 2025
…635)

(cherry picked from commit 74d96a4)

# Conflicts:
#	src/main/java/io/cryostat/agent/triggers/TriggerParser.java
andrewazores added a commit that referenced this pull request Apr 23, 2025
…backport #635) (#638)

* fix(callback): perform callback resolution within registration loop (#635)

(cherry picked from commit 74d96a4)

# Conflicts:
#	src/main/java/io/cryostat/agent/triggers/TriggerParser.java

* fixup! fix(callback): perform callback resolution within registration loop (#635)

---------

Co-authored-by: Andrew Azores <me@andrewazor.es>
Co-authored-by: Andrew Azores <aazores@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] DNS resolution of callback only happens once at startup
2 participants
0