summaryrefslogtreecommitdiff
path: root/ironic_python_agent/agent.py
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2019-05-13 10:25:10 -0400
committerDoug Hellmann <doug@doughellmann.com>2019-05-13 10:25:10 -0400
commit21393cb1c523bf746c48c5fef4935e89ab3da173 (patch)
treeae4c2380e439e2f37053cca76bbf5de5a8e53d03 /ironic_python_agent/agent.py
parent66d3c8e453a58c01740581079045e9b4368c4bde (diff)
downloadironic-python-agent-21393cb1c523bf746c48c5fef4935e89ab3da173.tar.gz
report the URL when heartbeats fail
We have seen issues in misconfigured systems where messages from IPA to ironic fail with 404 or other standard HTTP error codes. The messages do not include the URL of the service IPA is trying to talk to, which makes debugging the configuration difficult. This change adds the URLs to the end of a couple of errors already being reported to improve that situation. Change-Id: I6a4ea8768df016e58a073d78edbe4006e217d69e Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Diffstat (limited to 'ironic_python_agent/agent.py')
-rw-r--r--ironic_python_agent/agent.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ironic_python_agent/agent.py b/ironic_python_agent/agent.py
index c4b42f76..833d8fe1 100644
--- a/ironic_python_agent/agent.py
+++ b/ironic_python_agent/agent.py
@@ -137,11 +137,13 @@ class IronicPythonAgentHeartbeater(threading.Thread):
self.error_delay = self.initial_delay
LOG.info('heartbeat successful')
except errors.HeartbeatConflictError:
- LOG.warning('conflict error sending heartbeat')
+ LOG.warning('conflict error sending heartbeat to {}'.format(
+ self.agent.api_url))
self.error_delay = min(self.error_delay * self.backoff_factor,
self.max_delay)
except Exception:
- LOG.exception('error sending heartbeat')
+ LOG.exception('error sending heartbeat to {}'.format(
+ self.agent.api_url))
self.error_delay = min(self.error_delay * self.backoff_factor,
self.max_delay)