diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/utils/docker-util.c b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/utils/docker-util.c index 3884abf9de5..ee80798e777 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/utils/docker-util.c +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/utils/docker-util.c @@ -558,7 +558,8 @@ cleanup: int get_docker_inspect_command(const char *command_file, const struct configuration *conf, args *args) { const char *valid_format_strings[] = { "{{.State.Status}}", - "{{range(.NetworkSettings.Networks)}}{{.IPAddress}},{{end}}{{.Config.Hostname}}" }; + "{{range(.NetworkSettings.Networks)}}{{.IPAddress}},{{end}}{{.Config.Hostname}}", + "{{.State.Status}},{{.Config.StopSignal}}"}; int ret = 0, i = 0, valid_format = 0; char *format = NULL, *container_name = NULL, *tmp_buffer = NULL; struct configuration command_config = {0, NULL}; @@ -578,7 +579,7 @@ int get_docker_inspect_command(const char *command_file, const struct configurat ret = INVALID_DOCKER_INSPECT_FORMAT; goto free_and_exit; } - for (i = 0; i < 2; ++i) { + for (i = 0; i < 3; ++i) { if (strcmp(format, valid_format_strings[i]) == 0) { valid_format = 1; break;