Skip to content

HDDS-14932. Optional Recon and Httpfs Start Up - #10760

Draft
henrybear327 wants to merge 3 commits into
apache:masterfrom
henrybear327:HDDS-14932
Draft

HDDS-14932. Optional Recon and Httpfs Start Up#10760
henrybear327 wants to merge 3 commits into
apache:masterfrom
henrybear327:HDDS-14932

Conversation

@henrybear327

@henrybear327 henrybear327 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  • OZONE_LOCAL_RECON_ENABLED=true and --with-recon or --without-recon
  • OZONE_LOCAL_HTTPFS_ENABLED=true and --with-httpfs or --without-httpfs
  • optional port envs/flags for each service
  • data dirs under the local root, for example recon/ and httpfs/

Order:

  • start SCM/OM/DN
  • wait for local cluster readiness
  • start S3G/Recon/HttpFS based on config
  • wait for each optional service separately
  • print all advertised endpoints

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-14932

How was this patch tested?

https://github.com/apache/ozone/actions/runs/29328163181

@henrybear327
henrybear327 marked this pull request as draft July 14, 2026 11:14
@henrybear327
henrybear327 force-pushed the HDDS-14932 branch 3 times, most recently from 5974e6b to b60dd0d Compare July 14, 2026 22:16
@adoroszlai adoroszlai added the ozone-local HDDS-14893 label Jul 15, 2026
@henrybear327
henrybear327 force-pushed the HDDS-14932 branch 6 times, most recently from f294d96 to b209d72 Compare July 22, 2026 11:54
@henrybear327
henrybear327 force-pushed the HDDS-14932 branch 3 times, most recently from e064e3c to 6c723c6 Compare August 5, 2026 19:10
`ozone local run` swallowed every failure it hit: shutdown and start()
rollback errors went to IOUtils.closeQuietly with a null logger, the
readiness wait collapsed its conditions into a single boolean, and the
CLI converters rejected a value without naming it.

The launcher sets OZONE_LOGLEVEL=OFF for ozone-tools, so logging on its
own would stay invisible. A failed start now reports a message the user
can act on, pointing at `ozone --loglevel INFO local run` for the
service logs and --verbose for the stack trace.

Local defaults that replace a user-configured value are now recorded
and repeated on stderr by the CLI, so a discarded override stays
visible even when it is the very setting the user is debugging. The
datanode-count limit is checked before the format step so that format
mode ALWAYS cannot delete the data dir for a run that can never start.

Naming the unmet safe mode rules reads them as commons-lang3 Pair
values, a use that leaves no import behind, so ozone-tools declares
commons-lang3 for the dependency analyzer.
`ozone local run` starts an in-process S3 Gateway next to SCM, OM, and
the datanodes, so S3 clients can target a local cluster without a
separate gateway process or credential bootstrap. The runtime reserves
and persists ports for the gateway's HTTP, HTTPS, and web-admin
endpoints, provisions the fixed local credentials in OM (no `ozone s3
getsecret` step), and prints the endpoint plus the AWS settings a
local client needs, including path-style addressing. --no-s3g turns
the gateway off.

Listeners bind loopback by default. The provisioned credentials are
fixed and well known, so the previous wildcard default served a
remotely writable S3 endpoint on every interface while the summary
printed 127.0.0.1. --bind-host 0.0.0.0 is the opt-in for wider
exposure.

The gateway starts through call() rather than execute(): GenericCli's
execution-exception handler reduces a startup failure to a bare exit
code and can System.exit the JVM. call() returns only once Jetty
serves requests, so no readiness poll follows; the call runs under the
configured startup timeout so a hung startup rolls the cluster back
instead of blocking forever. A timed-out attempt can ignore the
interrupt and still finish late, so its cleanup is queued behind it on
the startup thread as that attempt's only stopper.
Recon stays off unless --recon asks for it, and starts in the same JVM
as the other services, reading its configuration through the static
ConfigurationProvider the way MiniOzoneCluster does.

ReconServer reports startup success even when its initialization failed,
so the launcher waits on an HTTP response from the Recon endpoint
instead. That wait is the S3 Gateway readiness probe, generalized to
take an endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ozone-local HDDS-14893

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants