From a2d25de6397ef3232a921fe074747ea2c518debf Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 13 May 2019 10:31:02 -0400 Subject: [PATCH] show inspection callback url in error messages We have seen issues in misconfigured systems where messages from IPA to ironic-inspector fail with 404 or other standard HTTP error codes. Although there is an info message reporting the URL, the error 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 URL to the error already being reported to improve that situation. Change-Id: Ib092ac690d29c385c0564c086ad2fec3df0fb2e0 Signed-off-by: Doug Hellmann --- ironic_python_agent/inspector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ironic_python_agent/inspector.py b/ironic_python_agent/inspector.py index ec83a8794..8195cdc6b 100644 --- a/ironic_python_agent/inspector.py +++ b/ironic_python_agent/inspector.py @@ -117,7 +117,8 @@ def call_inspector(data, failures): resp = requests.post(CONF.inspection_callback_url, data=data, verify=verify, cert=cert) if resp.status_code >= 400: - LOG.error('inspector error %d: %s, proceeding with lookup', + LOG.error('inspector %s error %d: %s, proceeding with lookup', + CONF.inspection_callback_url, resp.status_code, resp.content.decode('utf-8')) return