ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-8174. Ambari-deployed cluster can't start datanode as root from command line. Fix for hadoop-env. (swagle)
Date Thu, 06 Nov 2014 20:19:31 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 8f1adfc68 -> c75578a41


AMBARI-8174. Ambari-deployed cluster can't start datanode as root from command line. Fix for
hadoop-env. (swagle)


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

Branch: refs/heads/branch-1.7.0
Commit: c75578a41e80def8841dbebc566a80474f89a8fb
Parents: 8f1adfc
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Thu Nov 6 12:01:27 2014 -0800
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Thu Nov 6 12:16:47 2014 -0800

----------------------------------------------------------------------
 .../HDP/2.0.6/services/HDFS/package/scripts/utils.py    | 12 ++++++------
 .../HDP/2.2/services/HDFS/configuration/hadoop-env.xml  |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c75578a4/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/utils.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/utils.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/utils.py
index 36fbc86..c177d9c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/utils.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/utils.py
@@ -101,13 +101,13 @@ def service(action=None, name=None, user=None, create_pid_dir=False,
         except OSError:
           pass  # Process is not running
     pass
+  pass
 
-    # Set HADOOP_SECURE_DN_USER correctly in hadoop-env if DN is running as root
-    # in secure mode.
-    if user == 'root':
-      params.dn_proc_user = 'root'
-      hdfs.setup_hadoop_env(replace=True)
-    pass
+  # Set HADOOP_SECURE_DN_USER correctly in hadoop-env if DN is running as root
+  # in secure mode.
+  if name == 'datanode' and user == 'root':
+    params.dn_proc_user = 'root'
+    hdfs.setup_hadoop_env(replace=True)
   pass
 
   hadoop_env_exports_str = ''

http://git-wip-us.apache.org/repos/asf/ambari/blob/c75578a4/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml
index d25a25b..929e9c9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml
@@ -136,7 +136,7 @@ export JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}:/usr/hdp/current/hadoop-client/lib
 export HADOOP_OPTS="-Dhdp.version=$HDP_VERSION $HADOOP_OPTS"
 
 HDFS_DN_PROC_USER={{dn_proc_user}}
-if [ $HDFS_DN_PROC_USER="root" ]; then
+if [ $HDFS_DN_PROC_USER == "root" ]; then
   export HADOOP_SECURE_DN_USER="{{hdfs_user}}"
 else
   export HADOOP_SECURE_DN_USER=""


Mime
View raw message