From 9ef00dee631ed8110c68c33aa3830a37560a89df Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Fri, 21 Aug 2026 09:40:06 +0200 Subject: [PATCH 1/2] Fix merge_configs/yaml and concat behaviour Closes-Bug: #2164718 Change-Id: I9a7b12c660978f51b6102d58cc64de0d8dc30dd4 Signed-off-by: Michal Nasiadka (cherry picked from commit db8fda0828c509e4ed11f38a1550df0e9dcd56fc) --- ansible/roles/kolla-openstack/tasks/config.yml | 11 +++++++---- kayobe/plugins/action/merge_configs.py | 6 +++++- kayobe/plugins/action/merge_yaml.py | 6 +++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ansible/roles/kolla-openstack/tasks/config.yml b/ansible/roles/kolla-openstack/tasks/config.yml index ce318fbc6..96cda133d 100644 --- a/ansible/roles/kolla-openstack/tasks/config.yml +++ b/ansible/roles/kolla-openstack/tasks/config.yml @@ -117,12 +117,15 @@ - name: "Ensure extra configuration files exist (strategy: concat)" vars: params: - content: | - {%- for path in item.sources -%} - {{ lookup('file', path) }} - {%- endfor -%} + # join() guarantees exactly one newline between sources, regardless + # of whether a source file ends with one - lookup('file') rstrips + # trailing whitespace from each source, so concatenating without an + # explicit separator can glue the last line of one file to the first + # line of the next. + content: "{{ query('file', *item.sources) | join('\n') }}\n" dest: "{{ item.dest }}" mode: 0640 + lstrip_blocks: true template_content: "{{ params | combine(item.params) }}" with_items: "{{ kolla_custom_config_info.concat }}" diff --git a/kayobe/plugins/action/merge_configs.py b/kayobe/plugins/action/merge_configs.py index 0a93fbfe7..a72f4c122 100644 --- a/kayobe/plugins/action/merge_configs.py +++ b/kayobe/plugins/action/merge_configs.py @@ -167,7 +167,11 @@ def read_config(self, source, config): ] templar = self._templar.copy_with_new_env(searchpath=searchpath) - result = templar.template(template_data) + + # lstrip_blocks avoids Jinja2 block tags (e.g. {% if %}) leaving + # behind leading whitespace that glues adjacent lines together. + result = templar.template( + template_data, overrides=dict(lstrip_blocks=True)) fakefile = StringIO(result) config.parse(fakefile) fakefile.close() diff --git a/kayobe/plugins/action/merge_yaml.py b/kayobe/plugins/action/merge_yaml.py index c35b182b4..ae353191e 100644 --- a/kayobe/plugins/action/merge_yaml.py +++ b/kayobe/plugins/action/merge_yaml.py @@ -107,7 +107,11 @@ def read_config(self, source): ] templar = self._templar.copy_with_new_env(searchpath=searchpath) - template_data = templar.template(template_data) + + # lstrip_blocks avoids Jinja2 block tags (e.g. {% if %}) leaving + # behind leading whitespace that glues adjacent lines together. + template_data = templar.template( + template_data, overrides=dict(lstrip_blocks=True)) result = yaml.safe_load(template_data) return result or {} From df28b9824522dd918cea617a294c9f33fc34aac8 Mon Sep 17 00:00:00 2001 From: MurrayGroves Date: Tue, 13 Oct 2026 16:23:42 +0100 Subject: [PATCH 2/2] Bump stackhpc.libvirt-vm to 1.17.2 Closes-Bug: #2170208 Change-Id: I407f672a85f639f793e695000b6eb8e65d4c99ed Signed-off-by: MurrayGroves (cherry picked from commit b51f901bf541a8d50dc5bc2f02b9ea53498c4083) --- .../handle-304-in-image-download-8ceafad810dae83e.yaml | 6 ++++++ requirements.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/handle-304-in-image-download-8ceafad810dae83e.yaml diff --git a/releasenotes/notes/handle-304-in-image-download-8ceafad810dae83e.yaml b/releasenotes/notes/handle-304-in-image-download-8ceafad810dae83e.yaml new file mode 100644 index 000000000..adf5cd0c4 --- /dev/null +++ b/releasenotes/notes/handle-304-in-image-download-8ceafad810dae83e.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an error when downloading already downloaded VM images caused by HTTP + 304 Not Modified. + `LP#2170208 `__ diff --git a/requirements.yml b/requirements.yml index c1a29a603..c960f9a7d 100644 --- a/requirements.yml +++ b/requirements.yml @@ -57,7 +57,7 @@ roles: - src: stackhpc.libvirt-host version: v1.15.1 - src: stackhpc.libvirt-vm - version: v1.17.1 + version: v1.17.2 - src: stackhpc.luks version: 0.4.4 - src: stackhpc.os-ironic-state