YARN-11959. NodeManager becomes unhealthy when container exits with code 22 or 24#8474
Open
magnuma3 wants to merge 1 commit intoapache:trunkfrom
Open
YARN-11959. NodeManager becomes unhealthy when container exits with code 22 or 24#8474magnuma3 wants to merge 1 commit intoapache:trunkfrom
magnuma3 wants to merge 1 commit intoapache:trunkfrom
Conversation
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Pull request overview
Fixes a YARN NodeManager health regression where user container exit codes 22 or 24 are interpreted as LinuxContainerExecutor unrecoverable errors, causing the NodeManager to become unhealthy and stop scheduling containers.
Changes:
- Introduces a new native container-executor error code (
85) intended to represent a “wrapped” user container exit. - Wraps container launch exit codes
22and24to85for both Docker and non-DockerRUN_AS_USER_LAUNCH_*paths.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.../container-executor/impl/util.h |
Adds a new enum value for a wrapped user container exit code. |
.../container-executor/impl/main.c |
Wraps exit codes 22/24 to avoid triggering NodeManager unrecoverable ConfigurationException behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
109
to
114
| TOO_LONG_EXECUTOR_PATH = 81, | ||
| CANNOT_GET_EXECUTABLE_NAME_FROM_KERNEL = 82, | ||
| CANNOT_GET_EXECUTABLE_NAME_FROM_PID = 83, | ||
| WRONG_PATH_OF_EXECUTABLE = 84 | ||
| WRONG_PATH_OF_EXECUTABLE = 84, | ||
| WRAPPED_EXIT_CODE_USER_CONTAINER_FAILED = 85 | ||
| }; |
Comment on lines
+656
to
+663
| static int wrap_exit_code(int exit_code) { | ||
| if (exit_code == INVALID_CONTAINER_EXEC_PERMISSIONS || exit_code == INVALID_CONFIG_FILE) { | ||
| int wrap_code = WRAPPED_EXIT_CODE_USER_CONTAINER_FAILED; | ||
| fprintf(LOGFILE, "Wrapped exit code of user container from %d to %d to avoid NodeManager unhealthy...\n", exit_code, wrap_code); | ||
| return wrap_code; | ||
| } else { | ||
| return exit_code; | ||
| } |
| static int wrap_exit_code(int exit_code) { | ||
| if (exit_code == INVALID_CONTAINER_EXEC_PERMISSIONS || exit_code == INVALID_CONFIG_FILE) { | ||
| int wrap_code = WRAPPED_EXIT_CODE_USER_CONTAINER_FAILED; | ||
| fprintf(LOGFILE, "Wrapped exit code of user container from %d to %d to avoid NodeManager unhealthy...\n", exit_code, wrap_code); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
When a user container exits with code 22 or 24, the NodeManager becomes unhealthy and no more containers are allocated to that node. This situation can be resolved by restarting the NodeManager.
It can be reproduced immediately by running Scala Spark wordcount job that exits with code 22.
I propose to fix this by wrapping exit code 22 or 24 with different exit code, so that ConfigurationException that causes NodeManager to become unhealthy is not triggered.
How was this patch tested?
It can be reproduced immediately by running Scala Spark wordcount job that exits with code 22.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?AI Tooling
If an AI tool was used:
where is the name of the AI tool used.
https://www.apache.org/legal/generative-tooling.html