Repository: ambari Updated Branches: refs/heads/trunk f4f685239 -> 91cd8274a
AMBARI-17668. optimize log description of ambari agent stop (Wang Yaoxin via alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/91cd8274 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/91cd8274 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/91cd8274 Branch: refs/heads/trunk Commit: 91cd8274ae299f4fd4e6553bbd7f58f54148b65e Parents: f4f6852 Author: Alejandro Fernandez <[email protected]> Authored: Mon Aug 22 16:54:05 2016 -0700 Committer: Alejandro Fernandez <[email protected]> Committed: Mon Aug 22 16:54:05 2016 -0700 ---------------------------------------------------------------------- ambari-agent/src/main/python/ambari_agent/main.py | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/91cd8274/ambari-agent/src/main/python/ambari_agent/main.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/main.py b/ambari-agent/src/main/python/ambari_agent/main.py index c0f7b81..8e04564 100644 --- a/ambari-agent/src/main/python/ambari_agent/main.py +++ b/ambari-agent/src/main/python/ambari_agent/main.py @@ -233,6 +233,8 @@ def stop_agent(): res = runner.run([AMBARI_SUDO_BINARY, 'kill', '-9', str(pid)]) if res['exitCode'] != 0: raise Exception("Error while performing agent stop. " + res['error'] + res['output']) + else: + logger.info("Agent stopped successfully by kill -9, exiting.") sys.exit(0) def reset_agent(options):
