AMBARI-9827. Ambari-server setup-security 'Encrypt passwords' option does not 
work correctly (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0435e444
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0435e444
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0435e444

Branch: refs/heads/branch-2.0.0
Commit: 0435e444428da05cb91bf200e47b00d7679e3ede
Parents: 30ad80b
Author: Lisnichenko Dmitro <[email protected]>
Authored: Fri Feb 27 15:20:37 2015 +0200
Committer: Lisnichenko Dmitro <[email protected]>
Committed: Fri Feb 27 15:21:33 2015 +0200

----------------------------------------------------------------------
 ambari-server/src/main/python/ambari_server_main.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0435e444/ambari-server/src/main/python/ambari_server_main.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server_main.py 
b/ambari-server/src/main/python/ambari_server_main.py
index 4d47e5c..8ff4a72 100644
--- a/ambari-server/src/main/python/ambari_server_main.py
+++ b/ambari-server/src/main/python/ambari_server_main.py
@@ -160,7 +160,8 @@ def generate_child_process_param_list(ambari_user, 
current_user, java_exe, class
       jvm_args,
       conf_dir,
       suspend_mode)
-  return command
+  environ = os.environ.copy()
+  return (command, environ)
 
 @OsFamilyFuncImpl(OsFamilyImpl.DEFAULT)
 def generate_child_process_param_list(ambari_user, current_user, java_exe, 
class_path, debug_start, suspend_mode):
@@ -239,7 +240,7 @@ def generate_child_process_param_list(ambari_user, 
current_user, java_exe, class
     cmd = "{ulimit_cmd} ; {command}".format(ulimit_cmd=ulimit_cmd, 
command=command)
     
   param_list.append(cmd)
-  return param_list
+  return (param_list, environ)
 
 @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY)
 def wait_for_server_start(pidFile, scmStatus):
@@ -330,13 +331,12 @@ def server_process_main(options, scmStatus=None):
   suspend_start = (debug_mode & 2) or SUSPEND_START_MODE
   suspend_mode = 'y' if suspend_start else 'n'
 
-  param_list = generate_child_process_param_list(ambari_user, current_user,
+  (param_list, environ) = generate_child_process_param_list(ambari_user, 
current_user,
                                                  java_exe, class_path, 
debug_start, suspend_mode)
 
   if not os.path.exists(configDefaults.PID_DIR):
     os.makedirs(configDefaults.PID_DIR, 0755)
 
-  environ = os.environ.copy()
   print_info_msg("Running server: " + str(param_list))
   procJava = subprocess.Popen(param_list, env=environ)
 

Reply via email to