Skip to content

Commit 9152e2b

Browse files
Fix overriding nova config files when gpu_group_map is unset (#1879)
* Fix overriding nova config files when gpu_group_map is unset * Update etc/kayobe/kolla/config/nova/nova-api.conf Co-authored-by: Alex Welsh <[email protected]> --------- Co-authored-by: Alex Welsh <[email protected]>
1 parent 9bc279c commit 9152e2b

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
{% if gpu_group_map | default({}) %}
12
[pci]
2-
{% for item in (gpu_group_map | default({})) | dict2items | map(attribute='value') | flatten | unique | list %}
3+
{% for item in gpu_group_map | dict2items | map(attribute='value') | flatten | unique | list %}
34
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 }}" }
45
{% endfor %}
6+
{% endif %}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{% if gpu_group_map | default({}) %}
12
[pci]
23
{% raw %}
34
{% set gpu_list = [] %}
@@ -11,3 +12,4 @@ device_spec = { "vendor_id":"{{ stackhpc_gpu_data[item].vendor_id }}", "product_
1112
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 }}" }
1213
{% endfor %}
1314
{% endraw %}
15+
{% endif %}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
{% if gpu_group_map | default({}) %}
12
[filter_scheduler]
23
# Default list plus PciPassthroughFilter
34
# NOTE(Upgrade): defaults may change in each release. Default values can be
45
# checked here:
56
# https://docs.openstack.org/nova/latest/configuration/sample-config.html
67
enabled_filters = ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter
78
available_filters = nova.scheduler.filters.all_filters
9+
{% endif %}

0 commit comments

Comments
 (0)