You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/12/20 13:08:59 UTC
ambari git commit: AMBARI-19246. Ambari Agent start fails with local
variable 'server_url' referenced before assignment (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 8b3ec80ce -> a43837a35
AMBARI-19246. Ambari Agent start fails with local variable 'server_url' referenced before assignment (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a43837a3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a43837a3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a43837a3
Branch: refs/heads/branch-2.5
Commit: a43837a35536096224a77356a4049ea5b01a8bdc
Parents: 8b3ec80
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Dec 20 15:08:51 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Dec 20 15:08:51 2016 +0200
----------------------------------------------------------------------
ambari-agent/src/main/python/ambari_agent/main.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a43837a3/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 50e5d62..4eb478a 100644
--- a/ambari-agent/src/main/python/ambari_agent/main.py
+++ b/ambari-agent/src/main/python/ambari_agent/main.py
@@ -371,9 +371,9 @@ def main(heartbeat_stop_callback=None):
# Keep trying to connect to a server or bail out if ambari-agent was stopped
while not connected and not stopped:
for server_hostname in server_hostnames:
+ server_url = config.get_api_url(server_hostname)
try:
server_ip = socket.gethostbyname(server_hostname)
- server_url = config.get_api_url(server_hostname)
logger.info('Connecting to Ambari server at %s (%s)', server_url, server_ip)
except socket.error:
logger.warn("Unable to determine the IP address of the Ambari server '%s'", server_hostname)