Repository: ambari Updated Branches: refs/heads/branch-2.5 a2bd023b2 -> b14e303a2 refs/heads/trunk 1b3f03981 -> 25a596769
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/b14e303a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b14e303a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b14e303a Branch: refs/heads/branch-2.5 Commit: b14e303a2542d0ab9e0e1582eb00fc1e5b0509f6 Parents: a2bd023 Author: Renjith Kamath <[email protected]> Authored: Thu Jan 5 14:30:21 2017 +0530 Committer: Renjith Kamath <[email protected]> Committed: Thu Jan 5 14:30:21 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/b14e303a/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)
