AMBARI-17582. HIVE_SERVER_INTERACTIVE STOP failed with error "Python script has been killed due to timeout after waiting 900 secs" (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dfab464f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dfab464f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dfab464f Branch: refs/heads/branch-2.4 Commit: dfab464f0175c08fae0ae85c792af826f4702b29 Parents: 8f5f2c6 Author: Andrew Onishuk <[email protected]> Authored: Wed Jul 6 15:09:13 2016 +0300 Committer: Andrew Onishuk <[email protected]> Committed: Wed Jul 6 15:09:13 2016 +0300 ---------------------------------------------------------------------- .../package/scripts/hive_server_interactive.py | 17 ++++++----------- .../python/stacks/2.5/HIVE/test_hive_server_int.py | 6 +++++- 2 files changed, 11 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/dfab464f/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py index 1bdca08..875852f 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py @@ -231,7 +231,6 @@ class HiveServerInteractiveDefault(HiveServerInteractive): SLIDER_APP_NAME = "llap0" stop_cmd = ["slider", "stop", SLIDER_APP_NAME] - Logger.info(format("Command: {stop_cmd}")) code, output, error = shell.call(stop_cmd, user=params.hive_user, stderr=subprocess.PIPE, logoutput=True) if code == 0: @@ -239,18 +238,14 @@ class HiveServerInteractiveDefault(HiveServerInteractive): elif code == 69 and output is not None and "Unknown application instance" in output: Logger.info(format("Application {SLIDER_APP_NAME} was already stopped on Slider")) else: - raise Fail(format("Could not stop application {SLIDER_APP_NAME} on Slider")) + raise Fail(format("Could not stop application {SLIDER_APP_NAME} on Slider. {error}\n{output}")) # Will exit with code 4 if need to run with "--force" to delete directories and registries. - destroy_cmd = ['slider', 'destroy', SLIDER_APP_NAME, "--force"] - code, output, error = shell.call(destroy_cmd, user=params.hive_user, stderr=subprocess.PIPE) - if code == 0: - Logger.info(format("Successfully removed slider app {SLIDER_APP_NAME}.")) - else: - message = format("Could not remove slider app {SLIDER_APP_NAME}. Please retry this task.") - if error is not None: - message += " " + error - raise Fail(message) + Execute(('slider', 'destroy', SLIDER_APP_NAME, "--force"), + user=params.hive_user, + timeout=30, + ignore_failures=True, + ) """ Controls the start of LLAP. http://git-wip-us.apache.org/repos/asf/ambari/blob/dfab464f/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py index 1e1850e..dfa66ad 100644 --- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py +++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py @@ -213,7 +213,11 @@ class TestHiveServerInteractive(RMFTestCase): self.assertResourceCalled('File', '/var/run/hive/hive-interactive.pid', action=['delete'], ) - + self.assertResourceCalled('Execute', ('slider', 'destroy', 'llap0', '--force'), + ignore_failures = True, + user = 'hive', + timeout = 30, + ) self.assertNoMoreResources()
