ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/2] ambari git commit: AMBARI-20020. Ambari-server restart --debug failed (aonishuk)
Date Wed, 15 Feb 2017 12:42:19 GMT
AMBARI-20020. Ambari-server restart --debug failed (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: 107358dc36464334f5c46341f6f1fa252fa42441
Parents: b705866
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Feb 15 14:42:06 2017 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Feb 15 14:42:06 2017 +0200

----------------------------------------------------------------------
 ambari-server/src/main/python/ambari-server.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/107358dc/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 e7ffe4e..d99aa16 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -167,15 +167,18 @@ def stop(args):
     try:
       os.kill(pid, signal.SIGTERM)
     except OSError, e:
-      print_info_msg("Unable to stop Ambari Server - " + str(e))
-      return
+      err = "Unable to stop Ambari Server - " + str(e)
+      print_info_msg(err)
+      raise FatalException(1, err)
 
     print "Waiting for server stop..."
     logger.info("Waiting for server stop...")
 
     if not wait_for_server_to_stop(SERVER_STOP_TIMEOUT):
-      print "Ambari-server failed to stop"
-      logger.info("Ambari-server failed to stop")
+      err = "Ambari-server failed to stop"
+      print err
+      logger.error(err)
+      raise FatalException(1, err)
 
     pid_file_path = os.path.join(configDefaults.PID_DIR, PID_NAME)
     os.remove(pid_file_path)


Mime
View raw message