feat: ship kafka-probe and network diagnostics in the runner image - #391
Closed
velo wants to merge 1 commit into
Closed
feat: ship kafka-probe and network diagnostics in the runner image#391velo wants to merge 1 commit into
velo wants to merge 1 commit into
Conversation
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A production pipeline failed with nothing but this, repeated forever:
That single line is the enumerator's response to every pre-metadata failure. An empty bootstrap list, a DNS
failure, a dropped packet, a TLS mismatch and a rejected password are all indistinguishable in it. Triaging one
incident took a round trip to the customer to hand-patch log4j, redeploy, and mail back DEBUG logs — and the
image had no
dig, nonc, noss, so nothing could be checked from the pod either.What
kafka-probe— splits the failure into DNS / TCP / TLS+SASL+metadata and names the layer that broke. Itbuilds an
AdminClientfrom the connector classes already in/opt/flink/lib, so it exercises the same clientthe job does rather than an approximation, and it defaults to the pod's own
KAFKA_BOOTSTRAP_SERVERSandSQRL_KAFKA_*variables, so it tests the real configuration instead of a retyped copy.KAFKA_PROBE_DEBUG=1adds theNetworkClientand SASL handshake logs on stderr, so the DEBUG capture thatpreviously required editing cluster log4j and redeploying is now one env var. Client logs go to stderr and the
staged output to stdout, so the verdict stays greppable.
Diagnostic tools —
dnsutils,netcat-openbsd,iproute2,unzipadded to the existingapt-getlayer.Verification
Built the real image from
flink-sql-runner/target/Dockerfileand ran every branch as the unprivilegedflinkuser, against a live Redpanda broker for the paths that need one:
bootstrap.serversFAIL [config] bootstrap.servers is emptyDNSTCPSSLExceptionUnknownTopicOrPartitionExceptionREACHABLE(6 partitions)Worth noting the first two cases are exactly why the original error is so misleading: an empty or unresolvable
bootstrap list throws
ConfigExceptionat construction and never reacheslistNodes, so that timeout actuallyproves DNS resolved and narrows the problem to the network — the probe now says so directly.
Also confirmed Maven resource filtering (
src/main/dockeris copied withfiltering=true) leaves the${sys:...}and${JAVA_HOME:-...}expressions byte-identical,mvn clean testis green, andlicense:check/spotless:checkpass.Cost
~3 MB on a ~2.9 GB image:
These are debugging tools in a runtime image, which is a real if small trade — async-profiler already set that
precedent here, and the alternative is that the next connectivity incident costs another customer round trip.
Happy to move them behind a build arg if you'd rather keep the default image lean.