Repository navigation
P07: Port secure client addresses to ZooKeeper 3.8.7 - #183
Merged
bellatrix007 merged 2 commits intoDec 3, 2026
Merged
bellatrix007 merged 2 commits into
bellatrix007 merged 2 commits into
Conversation
This was referenced Nov 23, 2026
bellatrix007
force-pushed
the
adbansal/zk-387-p07-secure-client-addresses
branch
from
November 27, 2026 06:10
d67cbbc to
40cdd3b
Compare
arkmish
reviewed
Dec 1, 2026
arkmish
left a comment
There was a problem hiding this comment.
This branch is stacked on a stale P06 commit (8150e668ec) instead of current P06 (#182) HEAD (1103109081, which includes CI-fix commit e2eb23564a and rebased P04/P05/P06). As a result:
- GitHub renders ~6,262 diff lines across 53 files (4,400+ stale lines from earlier PRs) instead of P07's actual ~1,864-line diff.
- CI (
mvn (full-build-java-tests, 11)) is failing onReadOnlyModeTest.testConnectionEvents(failed job).
Please rebase onto current #182 HEAD so the diff is clean and CI runs with e2eb23564a.
Port the fork change for ZOOKEEPER-4276 (#120) that adds an optional secure client address to server.N entries and makes the plaintext client address optional, e.g. server.5=125.23.63.23:1234:1235;;1237 The secure address is parsed, serialized, compared and duplicate-checked with the other addresses, agrees with secureClientPort/secureClientPortAddress in the static config, is erased from the static config once it is set dynamically, and is applied to the secure listener on reconfiguration. Reconfiguration also shuts down or starts the plaintext listener when its address is removed or added, and a joiner needs at least one client address. Adapted to 3.8.7: own-entry lookups use getMyId(), because getId() is Thread.getId() on this line. Carried tests are converted to JUnit 5 and focused parsing, configuration, persistence and listener tests are added. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Describe the fork extension without an incorrect upstream version label, distinguish static address fallback from reconfiguration joiner requirements, and disclose the inherited listener-creation limitation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bellatrix007
force-pushed
the
adbansal/zk-387-p07-secure-client-addresses
branch
from
December 1, 2026 12:38
40cdd3b to
a476430
Compare
arkmish
approved these changes
Dec 3, 2026
arkmish
left a comment
There was a problem hiding this comment.
LGTM. Thanks for addressing the comments.
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.
Description
Port #120 (ZOOKEEPER-4276) to 3.8.7, stacked on #182. Quorum entries can advertise a secure client address after a second semicolon:
The secure address participates in serialization, equality, duplicate checks and static/dynamic configuration reconciliation. TLS-only startup does not create a plaintext listener. Reconfiguration can remove or rebind existing listeners. The 3.8.7 adaptation uses
getMyId()for own-member lookups; the older port'sgetId()resolves to the thread ID here.Known inherited limitation: creating a previously absent listener through an in-place reconfiguration binds the port without attaching the active server. Clients receive connection-loss errors until a subsequent role transition or restart. This port preserves that behavior and documents it; it does not claim that all in-place listener transitions work.
Tests
Added/ported secure-address parsing, static/dynamic configuration, TLS-only startup, dual listeners, persistence/restart and listener-reconfiguration cases; adapted carried test lifecycle/assertions to Jupiter.
Selected Maven
clean verifysuite (-pl zookeeper-server -am): 80 cases on each of Java 8, 11 and 17, 240 executions total, with no failures, errors, skips or retries. Each run includes 27 baseline cases plus 53 selected configuration/TLS/client cases.Broader Java 11 regression: 147 initial cases, 141 passed. Two test-isolation errors were corrected and pass in the exact-head matrix. Four IPv6 cases passed separately without the IPv4-only fixture flag. The initial failures are retained, not reported as a clean first run.
Java 11 assembly, RAT, Checkstyle and SpotBugs passed. Only documentation changed afterward.
Address-grammar probes match the source fork for 16 inputs. Listener-creation probes reproduce the limitation above on both the fork and this port. Full mixed-version rolling-upgrade and production IPv6 qualification remain separate.
Local code review completed
Changes that Break Backward Compatibility (Optional)
AddressTuplerequires an additional secure-address constructor argument, andQuorumPeerConfig.editStaticConfigrequires an additional flag. The prior five-argumentQuorumServerconstructor remains available.ConfigUtils.getClientConfigStrstill lists plaintext addresses only; extra semicolon sections are not validated consistently.Documentation (Optional)
Updated
zookeeperReconfig.mdwith secure-address forms, static-setting compatibility, configuration-parser requirements and the inherited in-place listener-creation limitation.🤖 Generated with GitHub Copilot CLI