Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 5e2fe569d -> 35c3c5302


AMBARI-16727: Add sleep time after stop of Ranger Admin for better handling of 
EU (Mugdha Varadkar via gautam)


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

Branch: refs/heads/branch-2.4
Commit: 35c3c5302e1a8d902c90c0dde00d4fc7fe6d5c5b
Parents: 5e2fe56
Author: Gautam Borad <[email protected]>
Authored: Wed May 18 17:23:47 2016 +0530
Committer: Gautam Borad <[email protected]>
Committed: Wed May 18 19:10:13 2016 +0530

----------------------------------------------------------------------
 .../python/resource_management/libraries/script/script.py   | 9 +++++++--
 .../test/python/stacks/2.2/RANGER/test_ranger_usersync.py   | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/35c3c530/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index cbf313e..eca7825 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -655,9 +655,14 @@ class Script(object):
         else:
           self.pre_rolling_restart(env)
 
+      service_name = config['serviceName'] if config is not None and 
'serviceName' in config else None
       try:
-        self.status(env)
-        raise Fail("Stop command finished but process keep running.")
+        #TODO Once the logic for pid is available from Ranger code, will 
remove the below if block.
+        if service_name == 'RANGER' and service_name is not None:
+          Logger.info('Temporary Skipping status check for RANGER service 
only.')
+        else:
+          self.status(env)
+          raise Fail("Stop command finished but process keep running.")
       except ComponentIsNotRunning as e:
         pass  # expected
       except ClientComponentHasNoStatus as e:

http://git-wip-us.apache.org/repos/asf/ambari/blob/35c3c530/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_usersync.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_usersync.py 
b/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_usersync.py
index 98a0b38..f0aee10 100644
--- a/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_usersync.py
+++ b/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_usersync.py
@@ -153,7 +153,7 @@ class TestRangerUsersync(RMFTestCase):
                               sudo = True)
     self.assertResourceCalledIgnoreEarlier("Execute", ('ambari-python-wrap', 
'/usr/bin/hdp-select', 'set', 'ranger-usersync', '2.3.0.0-1234'), sudo=True)
 
-    self.assertEquals(3, mocks_dict['call'].call_count)
+    self.assertEquals(2, mocks_dict['call'].call_count)
     self.assertEquals(1, mocks_dict['checked_call'].call_count)
     self.assertEquals(
       ('ambari-python-wrap', '/usr/bin/conf-select', 'set-conf-dir', 
'--package', 'ranger-usersync', '--stack-version', '2.3.0.0-1234', 
'--conf-version', '0'),

Reply via email to