Skip to content

Commit 4cc75d1

Browse files
authored
Merge pull request #1648 from stackhpc/fix-pci-default-template
Fix PCI passthrough default templates
2 parents 6e720be + a812b7c commit 4cc75d1

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

etc/kayobe/ansible/pci-passthrough.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
vfio_pci_ids: |-
1212
{% set gpu_list = [] %}
1313
{% set output = [] %}
14-
{% for gpu_group in gpu_group_map | dict2items | default([]) %}
14+
{% for gpu_group in (gpu_group_map | default({})) | dict2items %}
1515
{% if gpu_group.key in group_names %}
1616
{% set _ = gpu_list.append(gpu_group.value) %}
1717
{% endif %}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[pci]
2-
{% for item in gpu_group_map | dict2items | map(attribute='value') | flatten | unique | list %}
2+
{% for item in (gpu_group_map | default({})) | dict2items | map(attribute='value') | flatten | unique | list %}
33
alias = { "vendor_id":"{{ stackhpc_gpu_data[item].vendor_id }}", "product_id":"{{ stackhpc_gpu_data[item].product_id }}", "device_type":"{{ stackhpc_gpu_data[item].device_type }}", "name":"{{ stackhpc_gpu_data[item].resource_name }}" }
44
{% endfor %}

etc/kayobe/kolla/config/nova/nova-compute.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[pci]
22
{% raw %}
33
{% set gpu_list = [] %}
4-
{% for gpu_group in gpu_group_map | dict2items | default([]) %}
4+
{% for gpu_group in (gpu_group_map | default({})) | dict2items %}
55
{% if gpu_group.key in group_names %}
66
{% set _ = gpu_list.append(gpu_group.value) %}
77
{% endif %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes possible templating error with PCI passthrough configuration.

0 commit comments

Comments
 (0)