JiaLiangC opened a new pull request, #4283:
URL: https://github.com/apache/ambari/pull/4283

   ## What changes were proposed in this pull request?
   
   **Problem:** Changing Kerberos mode on BIGTOP removes the NodeManager 
recovery directory after Ambari has already created it. With a root-owned 
mode0755 parent, the yarn daemon cannot recreate the directory. Hadoop3.3.6 
then fails initialization with `yarn-nm-state/LOCK: No such file or directory`, 
requiring a manual retry.
   
   **Result:** Recreate the yarn-owned recovery directory immediately after 
intentional cleanup, using the existing hardened directory helper. Old recovery 
state is still discarded across the security boundary, and normal restarts 
preserve their existing database. Directory failures propagate before advancing 
the security marker.
   
   The production change is seven added lines in the shared BIGTOP3.2.0 YARN 
script inherited by3.3.0 and3.6.0. There are no daemon-argument overrides or 
yarn-site configuration changes. `recovery.supervised=true` remains enabled 
throughout.
   
   ```mermaid
   flowchart LR
     A[Security-mode change] --> B[Remove old recovery state]
     B --> C[Fix: recreate yarn-owned directory]
     C --> D[Start with supervised=true]
   ```
   
   Issue: [AMBARI-26690](https://issues.apache.org/jira/browse/AMBARI-26690).
   
   ## How was this patch tested?
   
   ```bash
   
PYTHONPATH=ambari-common/src/main/python:ambari-common/src/test/python:ambari-server/src/main/resources/stacks:ambari-server/src/test/python
 \
     python3 -m unittest -q TestNodeManagerRecoveryDirectory 
TestYarnBigtopWorkflows TestYarnBigtopLifecycle TestYarnBigtopConfig
   
   uvx ruff check \
     
ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py
 \
     ambari-server/src/test/python/TestNodeManagerRecoveryDirectory.py
   
   mvn -B -DskipTests apache-rat:check
   ```
   
   **199 tests passed, Ruff passed, complete RAT reactor passed.** Four new 
tests exercise actual temporary recovery trees for both security directions, 
state preservation on normal restart, cleanup failure, and retry after failed 
recreation. Existing tests cover the directory helper's path/ownership/symlink 
validation.
   
   Live BIGTOP3.3.0/Rocky8/Hadoop3.3.6 verification used existing RPMs and the 
combined integration branch with the previously proposed installation/security 
fixes. After re-arming the security marker on one stopped test NodeManager, 
request33 completed; a normal supervised restart completed as request35. The 
actual process user, native CURRENT ownership, rendered/desired configuration, 
and authenticated ResourceManager node registration were checked. The full 
cluster's Kerberos state was not toggled again; the original failure came from 
its full enable workflow. A full3.6.0 runtime rerun is not claimed.
   
   **Reviewable before/after records and exact source hashes:** [immutable 
evidence 
archive](https://github.com/JiaLiangC/ambari/blob/c02f0d1b3e08c169e2a1b569c087d2f86d9f5df7/validation/nodemanager-recovery-20261204/README.md).
 It includes raw native failure, patched-start and normal-restart JSON, source 
validation and a lifecycle diagram. Earlier genuine Ambari/Ranger screenshots 
are linked as historical context.
   
   **Environment limitation:** The shared disk was nearly full during this 
follow-up. Native ResourceManager reports all three registered nodes UNHEALTHY 
due to capacity; the archive explicitly retains `cluster_healthy=false` and 
health reports. No disk threshold was raised or capacity alert suppressed. This 
verifies the recovery/startup fix, not a healthy-capacity cluster or successful 
YARN workloads.
   
   Please review [Ambari Contributing 
Guide](https://cwiki.apache.org/confluence/display/AMBARI/How+to+Contribute) 
before opening a pull request.
   


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