You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by jb...@apache.org on 2020/08/17 16:44:11 UTC

[hadoop] branch trunk updated: YARN-10391. --module-gpu functionality is broken in container-executor. Contributed by Eric Badger

This is an automated email from the ASF dual-hosted git repository.

jbrennan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 4a7deae  YARN-10391. --module-gpu functionality is broken in container-executor. Contributed by Eric Badger
4a7deae is described below

commit 4a7deae478947c2ec250854ce6ecdf710d7637c3
Author: Jim Brennan <jb...@apache.org>
AuthorDate: Mon Aug 17 16:41:15 2020 +0000

    YARN-10391. --module-gpu functionality is broken in container-executor. Contributed by Eric Badger
---
 .../src/main/native/container-executor/impl/main.c          | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c
index 9555f80..ff59b96 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c
@@ -658,15 +658,15 @@ int main(int argc, char **argv) {
   assert_valid_setup(argv[0]);
 
   int operation = -1;
-  int ret = validate_arguments(argc, argv, &operation);
+  int exit_code = 0;
+  exit_code = validate_arguments(argc, argv, &operation);
 
-  if (ret != 0) {
-    flush_and_close_log_files();
-    return ret;
+  if (exit_code != 0 || operation == -1) {
+    // if operation is still -1, the work was done in validate_arguments
+    // e.g. for --module-gpu
+    goto cleanup;
   }
 
-  int exit_code = 0;
-
   switch (operation) {
   case CHECK_SETUP:
     //we already did this
@@ -831,6 +831,7 @@ int main(int argc, char **argv) {
     break;
   }
 
+cleanup:
   if (exit_code) {
     fprintf(ERRORFILE, "Nonzero exit code=%d, error message='%s'\n", exit_code,
             get_error_message(exit_code));


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org