Russole opened a new pull request, #9396:
URL: https://github.com/apache/ozone/pull/9396

   ## What changes were proposed in this pull request?
   This PR refines the core-dump setup logic in ozone-env.sh / hadoop-env.sh to 
avoid spurious warnings when running Ozone commands as non-root users.
   Previously, the scripts unconditionally attempted:
   ```bash
   ulimit -c unlimited
   ```
   On systems where the hard limit for core files is 0 (e.g., non-root users in 
production clusters, or Docker containers started with --ulimit core=0), this 
command always fails and prints:
   ```bash
   ulimit: core file size: cannot modify limit: Operation not permitted
   ```
   which pollutes the output of Ozone CLI commands such as:
   ```bash
   ozone version
   ozone sh volume list
   ```
   In this PR, we
   * Checking the hard limit via ulimit -Hc.
   If the hard limit is 0, the environment does not permit raising the 
core-dump size, so the script skips the change instead of attempting an 
operation that would always fail.
   * Silencing all potential errors via 2>/dev/null || true, ensuring that CLI 
output remains clean across all environments.
   
   This preserves the original intent — enabling core dumps for debugging 
native crashes — while avoiding noisy warnings for restricted users.
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-4267
   ## How was this patch tested?
   I relied on existing unit and integration tests, and verified that the full 
CI passed on my fork.
   Please let me know if additional tests are needed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to