Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 22CC2200C2D for ; Fri, 17 Feb 2017 23:06:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 21997160B7B; Fri, 17 Feb 2017 22:06:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7621B160B73 for ; Fri, 17 Feb 2017 23:06:01 +0100 (CET) Received: (qmail 71460 invoked by uid 500); 17 Feb 2017 22:06:00 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 71288 invoked by uid 99); 17 Feb 2017 22:06:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2017 22:06:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5E3AEE0082; Fri, 17 Feb 2017 22:06:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ncole@apache.org To: commits@ambari.apache.org Date: Fri, 17 Feb 2017 22:06:04 -0000 Message-Id: In-Reply-To: <2d2f1b24efc245ada230113ef9716bf4@git.apache.org> References: <2d2f1b24efc245ada230113ef9716bf4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [05/50] [abbrv] ambari git commit: AMBARI-20020. Ambari-server restart --debug failed (aonishuk) archived-at: Fri, 17 Feb 2017 22:06:02 -0000 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 Authored: Wed Feb 15 14:42:03 2017 +0200 Committer: Andrew Onishuk 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)