Skip to content
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

Add image platform argument #53

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add image platform argument #53

wants to merge 6 commits into from

Conversation

MaxBed4d
Copy link

@MaxBed4d MaxBed4d commented Feb 6, 2025

No description provided.

@MaxBed4d MaxBed4d requested a review from a team as a code owner February 6, 2025 13:29
jackhodgkiss
jackhodgkiss previously approved these changes Feb 7, 2025
%}-p {{ item.packages | join(',') }}{% endif %} {{ os_images_common }} {{ item.elements | join(' ') }} -o {{ item.name }}
{% if item.size is defined %}--image-size {{ item.size }}{% endif %} {% if item.type is defined %}-t {{ item.type }}{% endif %}
{% if item.packages | default %}-p {{ item.packages | join(',') }}{% endif %} {{ os_images_common }} {{ item.elements | join(' ') }}
-o {{ item.name }} -a {{ os_images_architecture }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we set a default value for os_images_architecture? Otherwise I think this will break existing usage of the role as no one will have defined this yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it could be set based on the target host's arch?

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This role can be used outside of Kayobe though :)

Copy link
Contributor

Choose a reason for hiding this comment

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

We probably want architecture as part of os_images_list right?

That would make this something like:
{% if item.architecture | default %}-a {{ item.architecture }}{% endif %}

This wouldn't need a kayobe change then, just one in kayobe-config to add architecture as an element in overcloud_dib_host_images

Copy link
Author

Choose a reason for hiding this comment

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

All the variables in this task are directly derived from the disk image builder variables in Kayobe so if trying to use it without the role from Kayobe they would be encountering other issues of the exact same nature, which would only work when they have defined the variables. But I see your point and we could add another default, but this should also be reflected for other vars too

Copy link
Contributor

Choose a reason for hiding this comment

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

(accidentally deleted my comment) Discussed with @MaxBed4d, we should account for this existing option too:

MoteHue
MoteHue previously approved these changes Feb 7, 2025
Copy link
Member

@bbezak bbezak left a comment

Choose a reason for hiding this comment

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

could you please add this info to readme and maybe example playbook there ? let's not force people to look into the code ;)

@MaxBed4d
Copy link
Author

could you please add this info to readme and maybe example playbook there ? let's not force people to look into the code ;)

Done, added to the README.md

@MaxBed4d MaxBed4d requested a review from bbezak February 10, 2025 10:24
@MaxBed4d MaxBed4d force-pushed the aarch64-image-build branch from 97dff41 to c579189 Compare February 10, 2025 10:39
@MaxBed4d MaxBed4d force-pushed the aarch64-image-build branch from c579189 to 31ad1be Compare February 18, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants