Skip to content

docs: document hostnames in cluster file and coordinators command - #14289

Open
VanshBhardwaj24 wants to merge 1 commit into
apple:mainfrom
VanshBhardwaj24:docs-coordinator-hostnames
Open

VanshBhardwaj24 wants to merge 1 commit into
apple:mainfrom
VanshBhardwaj24:docs-coordinator-hostnames

Conversation

@VanshBhardwaj24

@VanshBhardwaj24 VanshBhardwaj24 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The docs still say that the cluster file lists IP addresses "(not hostnames)", and that the coordinators command and the coordinators/processes special key take IP:port pairs. Hostnames are supported:

  • ClusterConnectionString parses each entry with Hostname::isHostname, so a list can mix hostnames and IP addresses (fdbclient/MonitorLeader.cpp), and Hostname::parse accepts an optional :tls suffix (flow/Hostname.cpp).
  • The coordinators command and the special key accept HOSTNAME:PORT (fdbcli/CoordinatorsCommand.cpp, fdbclient/SpecialKeySpace.cpp). changeQuorumChecker resolves the hostnames and fails with COORDINATOR_UNREACHABLE if any of them does not resolve, and reading the special key returns the resolved addresses (fdbclient/ManagementAPI.cpp, fdbclient/SpecialKeySpace.cpp).
  • coordinators auto returns network addresses (AutoQuorumChange in fdbclient/ManagementAPI.cpp), so if it changes the coordinators the cluster file lists IP addresses instead of hostnames. guide-common.rst.inc already says it selects processes by IP address.
  • The 7.1.4 release notes list "Added hostname DNS resolution logic for cluster connection string" (Check in the new Hostname logic (release-7.1). #6998), and the 7.1.8 notes list "Fixed an issue that coordinatorsKey does not store DNS names" (coordinatorsKey should not always store IP addresses (release-7.1). #7203).
  • The /fdbclient/MonitorLeader/parseConnectionString/hostnames unit test covers hostname-only connection strings, the :tls suffix, and rejection of duplicate hostnames.

This updates administration.rst, the shared cluster-file rule in guide-common.rst.inc, command-line-interface.rst and special-keys.rst to describe the HOSTNAME:PORT form and these caveats. The new text only states what the code and tests above show.

Not changed here: the built-in fdbcli help text for coordinators, architecture.rst and kv-architecture.rst still mention only IP:port. Those can go in a follow-up.

Validation: the Sphinx 6.2.1 HTML build passes with warnings treated as errors, using the same sphinx-build -W invocation as documentation/CMakeLists.txt. git diff --check is clean. The unit tests and fdbcli were not built or run.

Docs-only change; no code or behavior is affected.

Related to #3469.

@ShreeChaturvedi
ShreeChaturvedi self-requested a review October 16, 2026 19:41

@ShreeChaturvedi ShreeChaturvedi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! One correction before merging: the new text says hostnames are kept as written, but coordinators auto writes IP addresses. If auto changes the coordinators, the hostnames in the cluster file are replaced. On a local cluster:

fdb> coordinators coord1.fdbtest:4700
  cluster file: ...@coord1.fdbtest:4700
fdb> configure double
fdb> coordinators auto
  cluster file: ...@127.0.0.1:4701,127.0.0.1:4702,127.0.0.1:4703

I've suggested wording inline. A few smaller things readers might run into:

  • Running coordinators (or reading the special key) shows IPs even when the file has hostnames, so it looks like the change didn't work.
  • Every hostname has to resolve when you run coordinators, or the command fails.
  • Order isn't kept: IPs go first, then hostnames.

Fine for this PR: architecture.rst, kv-architecture.rst, and help coordinators still say IP:PORT only.

Comment thread documentation/sphinx/source/administration.rst Outdated
Comment thread documentation/sphinx/source/command-line-interface.rst Outdated
Comment thread documentation/sphinx/source/special-keys.rst Outdated
The cluster file format section said coordinators are IP addresses
"(not hostnames)", and the coordinators command and special key were
documented as taking only IP:port. Hostnames have been accepted since
7.1.4: ClusterConnectionString routes each entry through
Hostname::isHostname, and the coordinators command and special key
accept HOSTNAME:PORT.

Document the HOSTNAME:PORT form and the optional :tls suffix, that
each hostname must resolve when the coordinators are changed, and that
"coordinators auto" and reads of the coordinators key use IP addresses.
@VanshBhardwaj24
VanshBhardwaj24 force-pushed the docs-coordinator-hostnames branch from e800932 to 8e1d4b5 Compare October 17, 2026 12:01
@VanshBhardwaj24

Copy link
Copy Markdown
Contributor Author

Thanks @ShreeChaturvedi, that was a real miss on my part. I checked each point against the code and pushed an update:

  • coordinators auto returns NetworkAddresses (AutoQuorumChange::getDesiredCoordinators), so it does replace hostnames with IPs. I used your wording in administration.rst and the coordinators CLI section.
  • changeQuorumChecker returns COORDINATOR_UNREACHABLE when a hostname doesn't resolve, and coordinatorsGetRangeActor returns the resolved addresses, so I added both points, one to the CLI text and one to the special-keys text.
  • I dropped the character list. The regex in flow/Hostname.cpp rejects things like a leading or doubled dot, so the list over-claimed.

I left architecture.rst, kv-architecture.rst and the help coordinators text for a follow-up, as you suggested. I also updated the PR description to match.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants