public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
	kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 7/8] gen_nodes: fix YAML indentation in pcipassthrough template
Date: Mon, 11 Aug 2025 13:12:29 -0700	[thread overview]
Message-ID: <20250811201230.2145164-8-mcgrof@kernel.org> (raw)
In-Reply-To: <20250811201230.2145164-1-mcgrof@kernel.org>

The template was generating malformed YAML with improper indentation
and missing newlines between passthrough entries. This caused parsing
errors: "Colons in unquoted values must be followed by a non-space
character."

Fixed by:
- Removing the trailing whitespace stripping after 'pcipassthrough:'
- Ensuring proper indentation for all passthrough entries
- Maintaining consistent whitespace control throughout the macro

The generated YAML now correctly produces a single 'pcipassthrough'
key with properly indented sub-entries for all devices.

Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 playbooks/roles/gen_nodes/templates/gen_nodes_list.j2 | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/playbooks/roles/gen_nodes/templates/gen_nodes_list.j2 b/playbooks/roles/gen_nodes/templates/gen_nodes_list.j2
index 6ad2af1..bb4e053 100644
--- a/playbooks/roles/gen_nodes/templates/gen_nodes_list.j2
+++ b/playbooks/roles/gen_nodes/templates/gen_nodes_list.j2
@@ -5,14 +5,13 @@
 {%- if not ns.has_devices -%}
 {%- set ns.has_devices = true %}
     pcipassthrough:
-{% endif -%}
-      passthrough{{ ns.device_index | string }}:
+{% endif %}      passthrough{{ ns.device_index | string }}:
         domain: {{ d.domain }}
         bus: {{ d.bus }}
         slot: {{ d.slot }}
         function: {{ d.function }}
-{%- set ns.device_index = ns.device_index + 1 -%}
-{%- endif %}
+{% set ns.device_index = ns.device_index + 1 -%}
+{%- endif -%}
 {%- endfor -%}
 {%- endmacro -%}
 {%- macro gen_pci_passthrough( device_list ) -%}
-- 
2.47.2


  parent reply	other threads:[~2025-08-11 20:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 20:12 [PATCH 0/8] various fixes Luis Chamberlain
2025-08-11 20:12 ` [PATCH 1/8] libvirt: fix PCI-E passthrough configuration after Vagrant removal Luis Chamberlain
2025-08-11 20:12 ` [PATCH 2/8] gen-dynamic-pci: fix PCI passthrough target guest default value Luis Chamberlain
2025-08-11 20:12 ` [PATCH 3/8] gen-dynamic-pci: add GPU detection and naming support Luis Chamberlain
2025-08-11 20:12 ` [PATCH 4/8] guestfs / devconfig: allow for upgrade from Debian testing to forky Luis Chamberlain
2025-08-11 20:12 ` [PATCH 5/8] guestfs: add OVMF package for UEFI firmware support Luis Chamberlain
2025-08-11 20:12 ` [PATCH 6/8] gen_nodes: fix duplicate pcipassthrough keys in YAML output Luis Chamberlain
2025-08-11 20:12 ` Luis Chamberlain [this message]
2025-08-11 20:12 ` [PATCH 8/8] guestfs: fix PCIe passthrough device attachment Luis Chamberlain
2025-08-11 20:38 ` [PATCH 0/8] various fixes Chuck Lever
2025-08-11 21:31   ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250811201230.2145164-8-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=cel@kernel.org \
    --cc=da.gomez@kruces.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox