Skip to content

HDDS-15986. Report ozone local startup failures - #10934

Open
henrybear327 wants to merge 1 commit into
apache:masterfrom
henrybear327:HDDS-15986
Open

HDDS-15986. Report ozone local startup failures#10934
henrybear327 wants to merge 1 commit into
apache:masterfrom
henrybear327:HDDS-15986

Conversation

@henrybear327

@henrybear327 henrybear327 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR improves the error reporting and handling.

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.

What is the link to the Apache JIRA

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

How was this patch tested?

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

@henrybear327

Copy link
Copy Markdown
Contributor Author

@chungen0126 PTAL if this is what you meant in #10757 (review), thanks.

@henrybear327

Copy link
Copy Markdown
Contributor Author

@peterxcli PTAL, thanks.

@chungen0126 chungen0126 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 @henrybear327 for working on this.

Comment on lines +220 to +222
throw new IOException("Local Ozone failed to start: " + failureMessage(ex)
+ " Re-run with `ozone --loglevel INFO local run` for service logs,"
+ " or add --verbose for the full stack trace.", ex);

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.

I don't think we need the failureMessage extraction here. Since we are already passing ex as the cause in new IOException("...", ex).

private StorageContainerManager scm;
private OzoneManager om;
private final List<HddsDatanodeService> datanodes = new ArrayList<>();
private final List<String> discardedUserConfigKeys = new ArrayList<>();

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.

I am not entirely sure about the purpose of discardedUserConfigKeys. In my opinion, if a user specifies a parameter and it's invalid/incompatible, we should fail-fast and throw an error message, rather than silently modifying it.

`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.
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