You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2023/03/23 04:14:44 UTC

[impala] 01/02: IMPALA-12011: Unset JAVA_TOOL_OPTIONS variable for webserver_private_key_password_cmd

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

stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit fe29a356b91b3a13b95a3ecbaf2d161b556e93ef
Author: stiga-huang <hu...@gmail.com>
AuthorDate: Tue Mar 21 15:23:55 2023 +0800

    IMPALA-12011: Unset JAVA_TOOL_OPTIONS variable for webserver_private_key_password_cmd
    
    IMPALA-6293 intends to unset JAVA_TOOL_OPTIONS variable for all the
    shell commands that run java. So they won't fail in binding to the same
    debug port. However, it's not done correctly for the command of
    webserver_private_key_password_cmd. This patch corrects the mistake.
    
    Tests:
     - Tested on a secured cluster. Verified catalogd can start with port
       binding options set in JAVA_TOOL_OPTIONS.
    
    Change-Id: I40b57a8eb28e6e2b48b35b0f361f0e220c7f89d2
    Reviewed-on: http://gerrit.cloudera.org:8080/19638
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 be/src/util/webserver.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/be/src/util/webserver.cc b/be/src/util/webserver.cc
index 5051d17f5..9d2716591 100644
--- a/be/src/util/webserver.cc
+++ b/be/src/util/webserver.cc
@@ -419,9 +419,8 @@ Status Webserver::Start() {
 
       const string& password_cmd = FLAGS_webserver_private_key_password_cmd;
       if (!password_cmd.empty()) {
-        if (!RunShellProcess(password_cmd, &key_password, true)) {
-          return Status(TErrorCode::SSL_PASSWORD_CMD_FAILED, password_cmd, key_password,
-              {"JAVA_TOOL_OPTIONS"});
+        if (!RunShellProcess(password_cmd, &key_password, true, {"JAVA_TOOL_OPTIONS"})) {
+          return Status(TErrorCode::SSL_PASSWORD_CMD_FAILED, password_cmd, key_password);
         }
         options.push_back("ssl_private_key_password");
         options.push_back(key_password.c_str());