ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [05/50] [abbrv] ambari git commit: AMBARI-20020. Ambari-server restart --debug failed (aonishuk)
Date Fri, 17 Feb 2017 22:06:04 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/11893d46
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/11893d46
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/11893d46

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 11893d463f8001e97bfc71c18c7a650b19e969c0
Parents: f91095b
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Feb 15 14:42:03 2017 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Feb 15 14:42:03 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/11893d46/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 5002cd0..c985d65 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