You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/04/06 18:58:01 UTC
[12/50] ambari git commit: AMBARI-20579. Ambari-server failed to stop
(aonishuk)
AMBARI-20579. Ambari-server failed to stop (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d5249c61
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d5249c61
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d5249c61
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: d5249c6113cb005796bd4b1db7687e6f67cdc9cf
Parents: ad11804
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Apr 3 17:33:11 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Apr 3 17:33:11 2017 +0300
----------------------------------------------------------------------
ambari-server/src/main/python/ambari-server.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d5249c61/ambari-server/src/main/python/ambari-server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index c985d65..87cc6c2 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -175,10 +175,10 @@ def stop(args):
logger.info("Waiting for server stop...")
if not wait_for_server_to_stop(SERVER_STOP_TIMEOUT):
- err = "Ambari-server failed to stop"
+ err = "Ambari-server failed to stop gracefully. Sending SIGKILL to it"
print err
logger.error(err)
- raise FatalException(1, err)
+ os.kill(pid, signal.SIGKILL)
pid_file_path = os.path.join(configDefaults.PID_DIR, PID_NAME)
os.remove(pid_file_path)