Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 16ee88267 -> c1c1effca


AMBARI-12807 Accumulo Master Start fails on secure cluster if PID/Log dirs for 
YARN and MR2 are customized (dsen)


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

Branch: refs/heads/branch-2.1
Commit: c1c1effca601bbd2cd49b0946f7f12d10eef4380
Parents: 16ee882
Author: Dmytro Sen <[email protected]>
Authored: Tue Aug 18 16:02:40 2015 +0300
Committer: Dmytro Sen <[email protected]>
Committed: Tue Aug 18 16:05:57 2015 +0300

----------------------------------------------------------------------
 .../ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c1c1effc/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
index 14050c3..6b3aae1 100644
--- 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
+++ 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
@@ -31,6 +31,10 @@ def accumulo_service( name,
     pid_exists = format("ls {pid_file} >/dev/null 2>&1 && ps `cat {pid_file}` 
>/dev/null 2>&1")
 
     if action == 'start':
+      Execute(as_sudo(['chown','-R',params.accumulo_user+":"+params.user_group,
+                       format("$(getent passwd {accumulo_user} | cut -d: 
-f6)")],
+                      auto_escape=False),
+              ignore_failures=True)
       if name != 'tserver':
         Execute(format("{daemon_script} 
org.apache.accumulo.master.state.SetGoalState NORMAL"),
                 not_if=pid_exists,

Reply via email to