Fix leading and trailing whitespace in inspection_callback_url

This was templating as: " https://1.2.3.4:5050/v1/continue ". We can
remove this using the whitespace control modifiers from jinja, see:

https://jinja.palletsprojects.com/en/3.0.x/templates/#whitespace-control

Closes-Bug: #2072550
Change-Id: I45be2ddfb48004c9b880bd4b4627b2cf26a83616
This commit is contained in:
Will Szumski 2024-07-19 09:48:53 +01:00
parent cebecff3cc
commit a9dc56f4b9
2 changed files with 11 additions and 3 deletions

View File

@ -184,8 +184,8 @@
mode: "0644"
vars:
inspection_callback_url: >-
{% if enable_inspector | bool %}
{%- if enable_inspector | bool -%}
{{ api_protocol }}://{{ internal_ip }}:5050/v1/continue
{% else %}
{%- else -%}
{{ api_protocol }}://{{ internal_ip }}:6385/v1/continue_inspection
{% endif %}
{%- endif -%}

View File

@ -0,0 +1,8 @@
---
fixes:
- |
Fixes an issue where ``inspection_callback_url`` was templated with leading
whitespace. This caused the ``ipa-inspection-callback-url`` kernel command
line argument to be incorrectly set, leading to Ironic Python Agent posting
introspection data back to Ironic rather than Ironic Inspector when using
the ``enable_inspector`` option.