You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/17 22:06:04 UTC
[05/50] [abbrv] ambari git commit: AMBARI-20020. Ambari-server
restart --debug failed (aonishuk)
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 <ao...@hortonworks.com>
Authored: Wed Feb 15 14:42:03 2017 +0200
Committer: Andrew Onishuk <ao...@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)