Skip to content

HDDS-15732. Some ozone commands ignore OZONE_MODULE_ACCESS_ARGS#10655

Merged
sarvekshayr merged 3 commits into
apache:masterfrom
adoroszlai:HDDS-15732
Jul 6, 2026
Merged

HDDS-15732. Some ozone commands ignore OZONE_MODULE_ACCESS_ARGS#10655
sarvekshayr merged 3 commits into
apache:masterfrom
adoroszlai:HDDS-15732

Conversation

@adoroszlai

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Java 24/25 deprecation warnings are shown for several commands even after HDDS-15668.

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by org.apache.hadoop.util.NativeCodeLoader in an unnamed module (file:/opt/hadoop/share/ozone/lib/hadoop-common-3.4.3.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor (file:/opt/hadoop/share/ozone/lib/protobuf-java-3.25.9.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release

Examples:

ozone insight logs om.protocol.client
ozone repair om compact --column-family fileTable
ozone s3 getsecret
ozone shell volume list
ozone tenant list

Problems:

  • several commands completely ignore OZONE_MODULE_ACCESS_ARGS
  • ozone repair sets OZONE_DEBUG_OPTS instead of OZONE_REPAIR_OPTS
  • ozone shell is an alias for ozone sh, but only in the subcommand switch, so ozone_subcommand_opts looks for OZONE_SHELL_OPTS

Fix:

  • Apply RATIS_OPTS and OZONE_MODULE_ACCESS_ARGS to OZONE_OPTS globally. Setting these for commands that do not need them is harmless.
  • Update OZONE_SUBCMD upon shell -> sh conversion.

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

How was this patch tested?

$ ozone repair om compact --column-family fileTable
Compaction request issued for om.db of om node: null, column-family: fileTable with bottommost level compaction: kSkip.
Please check role logs of null for completion status.

$ export OZONE_SHELL_SCRIPT_DEBUG=true

$ ozone repair --help 2>&1 | grep -o '[^ ]*enable-native-access[^ ]*'
--enable-native-access=ALL-UNNAMED

$ ozone s3 getsecret --help 2>&1 | grep -o '[^ ]*enable-native-access[^ ]*'
--enable-native-access=ALL-UNNAMED

$ ozone tenant list --help 2>&1 | grep -o '[^ ]*enable-native-access[^ ]*'
--enable-native-access=ALL-UNNAMED

$ ozone shell volume list --help 2>&1 | grep -o '[^ ]*enable-native-access[^ ]*'
--enable-native-access=ALL-UNNAMED

CI:
https://github.com/adoroszlai/ozone/actions/runs/28657320150

@sarvekshayr sarvekshayr 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 @adoroszlai for identifying and fixing the issue.

LGTM.

@sarvekshayr sarvekshayr merged commit b974be3 into apache:master Jul 6, 2026
30 checks passed
@adoroszlai adoroszlai deleted the HDDS-15732 branch July 6, 2026 05:15
@adoroszlai

Copy link
Copy Markdown
Contributor Author

Thanks @sarvekshayr for reviewing and merging this.

errose28 added a commit to errose28/ozone that referenced this pull request Jul 7, 2026
* master: (519 commits)
  HDDS-14544. OM DB Insights: Duplicate API calls triggered when changing limit selector (apache#10677).
  HDDS-15587. [Recon] Show 0 for offline DN pending deletion instead of -1 (apache#10585).
  HDDS-15521. StreamBlockInputStream fails with TimeoutIOException without retry or failover. (apache#10479)
  HDDS-15170. Add mock-based unit tests for DataStream write path (apache#10230)
  HDDS-15552. Ratis events should not be published as metrics (apache#10523)
  HDDS-15746. Bump kerby to 2.1.2 (apache#10666)
  HDDS-15579. Replace SimpleSpanProcessor with BatchSpanProcessor (apache#10569)
  HDDS-15747. Address review comments for HDDS-15083 (apache#10669)
  HDDS-15732. Some ozone commands ignore OZONE_MODULE_ACCESS_ARGS (apache#10655)
  HDDS-15605. Fix flaky testContainerExclusionWithClosedContainerException (apache#10621)
  HDDS-11855. Fix flaky TestContainerBalancerDatanodeNodeLimit#checkIterationResultException (apache#10667)
  HDDS-15741. Bump awssdk to 2.46.17 (apache#10661)
  HDDS-10307. Speed up TestOzoneManagerHAWithStoppedNodes (apache#10658)
  HDDS-15651. Test case for DiskBalancer when markContainerForDelete fails (apache#10593)
  HDDS-15742. Bump nimbus-jose-jwt to 10.9.1 (apache#10662)
  HDDS-15719. Add check for allowed action usage in workflows (apache#10641)
  HDDS-15744. Bump javassist to 3.32.0-GA (apache#10665)
  HDDS-15737. Fix intermittent failure in balancerShouldOnlySelectConfiguredIncludeContainers (apache#10660)
  HDDS-15743. Bump gson to 2.14.0 (apache#10664)
  HDDS-11093. Fix intermittent failure in TestContainerBalancerDatanodeNodeLimit#testMetrics (apache#10659)
  ...

Conflicts:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerScanHelper.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants