Skip to content
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

CURATOR-535: Fix client port conflict due to untrustworthy random port allocation #421

Commits on Feb 21, 2023

  1. 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`.
    kezhuw committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    6348215 View commit details
    Browse the repository at this point in the history