You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2015/02/12 18:09:05 UTC
ambari git commit: AMBARI-9601. Ranger start/stop does not work from
command line if started from ambari (Velmurugan Periasamy via smohanty)
Repository: ambari
Updated Branches:
refs/heads/trunk 76365bc6e -> 6a9dada6a
AMBARI-9601. Ranger start/stop does not work from command line if started from ambari (Velmurugan Periasamy via smohanty)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6a9dada6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6a9dada6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6a9dada6
Branch: refs/heads/trunk
Commit: 6a9dada6a289c654504529cc53b4a34e6129665b
Parents: 76365bc
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Thu Feb 12 09:08:08 2015 -0800
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Thu Feb 12 09:08:08 2015 -0800
----------------------------------------------------------------------
.../RANGER/0.4.0/package/scripts/ranger_admin.py | 5 +++--
.../RANGER/0.4.0/package/scripts/ranger_usersync.py | 3 ++-
.../RANGER/0.4.0/package/scripts/setup_ranger.py | 1 +
3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/6a9dada6/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
index 1c09407..2a36f98 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
@@ -35,7 +35,7 @@ class RangerAdmin(Script):
import params
env.set_params(params)
- Execute(format('{params.ranger_stop}'))
+ Execute(format('{params.ranger_stop}'), user=params.unix_user)
def pre_rolling_restart(self, env):
import params
@@ -47,7 +47,8 @@ class RangerAdmin(Script):
env.set_params(params)
setup_ranger()
- Execute(format('{params.ranger_start}'))
+ no_op_test = format('ps -ef | grep proc_rangeradmin | grep -v grep')
+ Execute(format('{params.ranger_start}'), user=params.unix_user, not_if=no_op_test)
def status(self, env):
cmd = 'ps -ef | grep proc_rangeradmin | grep -v grep'
http://git-wip-us.apache.org/repos/asf/ambari/blob/6a9dada6/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py
index aa706f9..9cd0938 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py
@@ -46,7 +46,8 @@ class RangerUsersync(Script):
env.set_params(params)
setup_usersync()
- Execute(format('{params.usersync_start}'))
+ no_op_test = format('ps -ef | grep proc_rangerusersync | grep -v grep')
+ Execute(format('{params.usersync_start}'), not_if=no_op_test)
def status(self, env):
cmd = 'ps -ef | grep proc_rangerusersync | grep -v grep'
http://git-wip-us.apache.org/repos/asf/ambari/blob/6a9dada6/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
index c37915a..d699eae 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
@@ -89,6 +89,7 @@ def do_post_installation():
ranger_site['http.enabled'] = params.http_enabled
write_properties_to_file(file_path, ranger_site)
Logger.info('Performing Ranger post installation DONE')
+ Execute(format('chmod 744 {params.ranger_conf}/ranger_webserver.properties'))
def setup_usersync():
import params