Skip to content

Fix PCI passthrough default templates #1648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025

Conversation

seunghun1ee
Copy link
Member

Even though the variable gpu_group_map has default value of {} defined at stackhpc-compute.yml, it can be set to anything by users. Therefore, Using dict2items filter with it can cause unexpected templating error.

Fixing this by setting {} as a default of gpu_group_map before using dict2items filter.
So even if gpu_group_map becomes undefined for some reason, it doesn't fail in run time.

@seunghun1ee seunghun1ee self-assigned this May 14, 2025
@seunghun1ee seunghun1ee requested a review from a team as a code owner May 14, 2025 13:59
@product-auto-label product-auto-label bot added size: xs ansible Ansible playbooks labels May 14, 2025
Copy link
Contributor

@MoteHue MoteHue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me, thanks.

Copy link
Contributor

@MoteHue MoteHue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, it would be good to mention the fix in a release note

Copy link
Member

@Alex-Welsh Alex-Welsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reno

@seunghun1ee seunghun1ee force-pushed the fix-pci-default-template branch 2 times, most recently from 9ce543f to d0b4b53 Compare May 14, 2025 14:51
Even though the variable ``gpu_group_map`` has default value of {}
defined at stackhpc-compute.yml, it can be set to anything by users.
Therefore, Using dict2items filter with it can cause unexpected
templating error.

Fixing this by setting {} as a default of ``gpu_group_map`` before
using dict2items filter.
So even if ``gpu_group_map`` becomes undefined for some reason, it
doesn't fail in run time.
@seunghun1ee seunghun1ee force-pushed the fix-pci-default-template branch from d0b4b53 to a812b7c Compare May 14, 2025 15:00
@seunghun1ee seunghun1ee requested a review from MoteHue May 14, 2025 15:00
@seunghun1ee seunghun1ee merged commit 4cc75d1 into stackhpc/2024.1 May 15, 2025
15 checks passed
@seunghun1ee seunghun1ee deleted the fix-pci-default-template branch May 15, 2025 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible Ansible playbooks size: s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants