AMBARI-17068. RU failed because of old service was not stopped (dlysnichenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4eea7ccd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4eea7ccd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4eea7ccd Branch: refs/heads/trunk Commit: 4eea7ccdccbe60302a7e72177d575a9fc6eeb949 Parents: cee5c42 Author: Lisnichenko Dmitro <[email protected]> Authored: Tue Jun 7 11:35:00 2016 +0300 Committer: Lisnichenko Dmitro <[email protected]> Committed: Tue Jun 7 11:35:57 2016 +0300 ---------------------------------------------------------------------- ambari-agent/src/test/python/resource_management/TestScript.py | 2 +- .../src/main/python/resource_management/libraries/script/script.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/4eea7ccd/ambari-agent/src/test/python/resource_management/TestScript.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/resource_management/TestScript.py b/ambari-agent/src/test/python/resource_management/TestScript.py index adb8501..65f8c2d 100644 --- a/ambari-agent/src/test/python/resource_management/TestScript.py +++ b/ambari-agent/src/test/python/resource_management/TestScript.py @@ -36,6 +36,7 @@ from resource_management.libraries.script import Script from resource_management.core.environment import Environment from mock.mock import MagicMock, patch + class TestScript(TestCase): def setUp(self): @@ -115,7 +116,6 @@ class TestScript(TestCase): self.assertEqual(open_mock.call_count, 3) self.assertEqual(Script.structuredOut, {"1": "3", "2": "2"}) - def tearDown(self): # enable stdout sys.stdout = sys.__stdout__ http://git-wip-us.apache.org/repos/asf/ambari/blob/4eea7ccd/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 61759cc..d11fb13 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 @@ -664,6 +664,8 @@ class Script(object): services_to_skip = ['RANGER', 'RANGER_KMS'] if service_name in services_to_skip: Logger.info('Temporarily skipping status check for {0} service only.'.format(service_name)) + elif is_stack_upgrade: + Logger.info('Skipping status check for {0} service during upgrade'.format(service_name)) else: self.status(env) raise Fail("Stop command finished but process keep running.")
