You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/05/18 02:16:11 UTC

svn commit: r1484035 - in /incubator/ambari/trunk: CHANGES.txt ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp

Author: jaimin
Date: Sat May 18 00:16:11 2013
New Revision: 1484035

URL: http://svn.apache.org/r1484035
Log:
AMBARI-2161. Datanode Start fails in secure cluster. (jaimin)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1484035&r1=1484034&r2=1484035&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Sat May 18 00:16:11 2013
@@ -865,6 +865,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2161. Datanode Start fails in secure cluster. (jaimin)
+
  AMBARI-2160. zookeeper smoke test fails with unknown host exception for
  secure cluster.(jaimin)
 

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp?rev=1484035&r1=1484034&r2=1484035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp Sat May 18 00:16:11 2013
@@ -53,14 +53,14 @@ define hdp-hadoop::service(
   $cmd = "${hadoop_daemon} --config ${hdp-hadoop::params::conf_dir}"
   if ($ensure == 'running') {
     if ($run_as_root == true) {
-      $daemon_cmd = "${cmd} start ${name}"
+      $daemon_cmd = "su - root -c  '${cmd} start ${name}'"
     } else {
       $daemon_cmd = "su - ${user} -c  '${cmd} start ${name}'"
     }
     $service_is_up = "ls ${pid_file} >/dev/null 2>&1 && ps `cat ${pid_file}` >/dev/null 2>&1"
   } elsif ($ensure == 'stopped') {
     if ($run_as_root == true) {
-      $daemon_cmd = "${cmd} stop ${name}"
+      $daemon_cmd = "su - root -c  '${cmd} stop ${name}'"
     } else {
       $daemon_cmd = "su - ${user} -c  '${cmd} stop ${name}'"
     }