-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
082b26b
to
1a478b6
Compare
roles/os_images/tasks/images.yml
Outdated
%}-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 }} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defaults have been set in both Kayobe and SKC.
https://review.opendev.org/c/openstack/kayobe/+/940894/1/ansible/overcloud-host-image-build.yml
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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:
cpu_arch: x86_64 |
Co-authored-by: Matt Crees <[email protected]>
There was a problem hiding this 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 ;)
Done, added to the README.md |
97dff41
to
c579189
Compare
c579189
to
31ad1be
Compare
No description provided.