ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rkam...@apache.org
Subject [2/2] ambari git commit: AMBARI-19316 Zeppelin stop failed during EU while deleting pid file with customized service user (r-kamath)
Date Thu, 05 Jan 2017 09:02:14 GMT
AMBARI-19316 Zeppelin stop failed during EU while deleting  pid file with customized service
user (r-kamath)


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

Branch: refs/heads/trunk
Commit: 25a596769c7c420dc28e3a7178bf7f02dca5880f
Parents: 1b3f039
Author: Renjith Kamath <renjith.kamath@gmail.com>
Authored: Thu Jan 5 14:30:21 2017 +0530
Committer: Renjith Kamath <renjith.kamath@gmail.com>
Committed: Thu Jan 5 14:31:28 2017 +0530

----------------------------------------------------------------------
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py             | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/25a59676/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 04089ce..d3d494d 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -104,12 +104,19 @@ class Master(Script):
               mode=0755
               )
 
+  def chown_zeppelin_pid_dir(self, env):
+    import params
+    env.set_params(params)
+    Execute(("chown", "-R", format("{zeppelin_user}") + ":" + format("{zeppelin_group}"),
params.zeppelin_pid_dir),
+            sudo=True)
+
   def configure(self, env):
     import params
     import status_params
     env.set_params(params)
     env.set_params(status_params)
     self.create_zeppelin_log_dir(env)
+    self.chown_zeppelin_pid_dir(env)
 
     # create the pid and zeppelin dirs
     Directory([params.zeppelin_pid_dir, params.zeppelin_dir],
@@ -154,6 +161,7 @@ class Master(Script):
   def stop(self, env, upgrade_type=None):
     import params
     self.create_zeppelin_log_dir(env)
+    self.chown_zeppelin_pid_dir(env)
     Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh stop >> ' + params.zeppelin_log_file,
             user=params.zeppelin_user)
 


Mime
View raw message