Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CURATOR-535: Fix client port conflict due to untrustworthy random por…
…t allocation This commit tries to solve port conflict for `TestingServer` if port is unspecified(aka. `port <= 0`): * Set `InstanceSpec.port` to 0 if port is unspecified. * Save OS chosen bind port after started to maintain same port across restart. Ideally, it should be possible to bootstrap `TestingCluster`(with unspecified ports) too with help from `reconfig`. But there are difficulties since election port, quorum port were not designed to be bound to `0` in ZooKeeper. `TestingServer` should be enough for most cases. Users should resort to other solutions(eg. container) if they got bored by port conflict due to usages of `TestingCluster` and `TestingServer.restart`.
- Loading branch information
Showing
5 changed files
with
43 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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