clusterd: remove unused CTP server-FQDN validation#36876
Draft
jasonhernandez wants to merge 1 commit into
Draft
Conversation
d27b55c to
7e976bd
Compare
jasonhernandez
added a commit
that referenced
this pull request
Jun 2, 2026
Distroless containers run the binary directly as PID 1 (no tini/shell). On Linux, PID 1 ignores signals with a SIG_DFL disposition, so SIGTERM from Kubernetes pod termination would be silently dropped. Install an explicit termination-signal handler in clusterd (environmentd already has one), and derive CLUSTERD_PROCESS from the StatefulSet ordinal in-process (previously done by the entrypoint.sh that distroless removes). Minimal distroless-lifecycle change. #36876 stacks on this to remove the now-unused CTP server-FQDN validation. Part of SEC-236 distroless migration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Stacks on #36872 (SIGTERM handler). Removes the optional CTP `server_fqdn` handshake check: clusterd advertised its FQDN (via CLUSTERD_GRPC_HOST, set by the now-removed entrypoint.sh) and the controller compared it to the address it dialed. The check only fired when the value was set, is unrelated to gRPC despite the name, and guards only against reaching a misrouted replica. Drops `--grpc-host`/`CLUSTERD_GRPC_HOST`, the `server_fqdn` field from the CTP `Hello`, the `host_from_address` helper, and the `test_handshake_fqdn_mismatch` test. CTP version-gates the handshake, so dropping the field is fine across a release boundary. Part of SEC-236 distroless migration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7e976bd to
d5356e4
Compare
2 tasks
3 tasks
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.
Stacks on #36872
Removes the CTP
server_fqdnhandshake check thatCLUSTERD_GRPC_HOSTfed. Despite the name it has nothing to do with gRPC (which is now only persist pubsub). In the CTP handshake, clusterd advertised its FQDN and the controller compared it against the address it dialed, failing on mismatch (transport.rs::handshake). That check is:The distroless migration removes
entrypoint.sh, which setCLUSTERD_GRPC_HOSTviahostname --fqdn. Rather than re-plumb that, this removes the feature: drops--grpc-host/CLUSTERD_GRPC_HOST, theserver_fqdnfield from the CTPHello, thehost_from_addresshelper, and thetest_handshake_fqdn_mismatchtest.Notes
Helloloses a field. CTP version-gates the handshake (mismatched versions fail and reconnect), so this is safe across a release boundary.test_metricsbyte-count bounds were loosened (the handshake shrank).This is the "rip it out" answer to the FQDN question; it makes #36100 (in-process resolve) unnecessary.
Test plan
cargo check -p mz-clusterd -p mz-service -p mz-compute-client -p mz-storage-controller(rustc 1.96.0)cargo test -p mz-service --test transport— green across 10 consecutive runs🤖 Generated with Claude Code