Add DiB variables to allow platform architecture choice#1497
Add DiB variables to allow platform architecture choice#1497MaxBed4d wants to merge 8 commits intostackhpc/2025.1from
Conversation
|
@MaxBed4d could you fix the merge conflict, then re-request reviews from whoever you need? |
7af5ebd to
4be9f6c
Compare
|
@MaxBed4d does this depend on any changes to DIB or our DIB elements, or is it ready to go? |
|
What's the plan for consuming the aarch images? Are they just going to be pulled manually or do we need to extend the existing bifrost settings stackhpc-kayobe-config/etc/kayobe/stackhpc-overcloud-host-images.yml Lines 15 to 20 in 4b9eed0 |
e2d1c70 to
763d597
Compare
|
This PR has been updated, rebased onto As of today (09/09/25) builds are succeeding on SMS for Rocky9, Ubuntu Noble and Ubuntu Jammy. However, builds are for some reason suddenly failing on LeafCloud without a clear error message, however this can be looked at in a patch following this PR. The updates include the way in which images are saved and consumed. All Once this has been merged, we are able to merge in a PR to enable periodic image builds for all images across both architectures. |
|
@MaxBed4d could you rebase & squash this, and take a look at the CI failures? |
Yeah, I can tidy up the commits. The failing CI for the AiO seems to be due to a failed clock synchronisation, which seems to be more appropriate for a separate PR to this one. I will look into the tox pep8 tests to resolve them. |
etc/kayobe/kolla.yml
Outdated
| ############################################################################### | ||
| # Kolla platform architecture configuration. | ||
|
|
||
| kolla_base_arch: "{{ 'aarch64' if stackhpc_cpu_arch == 'arm64' else stackhpc_cpu_arch }}" | ||
|
|
There was a problem hiding this comment.
Why move this? It'll make it harder to sync the upstream kayobe-config when we create a new release
| properties: | ||
| - cpu_arch: "{{ overcloud_dib_architecture }}" |
There was a problem hiding this comment.
This is used to define the architecture for the os_images role in ansible-collection-openstack. This PR shows it being added.
There was a problem hiding this comment.
This section implies the default can be used:
# If an architecture
# of arm64 or aarch64 is defined, set cpu_arch: aarch64. In
# all other cases, leave it up to the operator to set
# properties.cpu_arch.
cpu_arch_properties:
{{
{"cpu_arch": "aarch64"}
if (item.0.architecture is defined and item.0.architecture in ["arm64", "aarch64"])
else ({"cpu_arch": "x86_64"} if item.0.architecture is not defined else {})
}}There was a problem hiding this comment.
But only if the build is for x86, if set to aarch64 there will be issues with the image if cpu_arch isn't set, this variable being set ensures this won't ever be an issue.
There was a problem hiding this comment.
The default says {"cpu_arch": "aarch64"} if (item.0.architecture is defined and item.0.architecture in ["arm64", "aarch64"])
Are you saying it doesn't work?
There was a problem hiding this comment.
After reviewing ansible-collection-openstack it seems that there were some additional changes made to the os_images role which I wasn't aware of which makes this variable not needed. It should instead be replaced with an architecture item.
However, this means that all aarch based tests ran in the last 2 weeks are invalid.
Thank you for bringing this to my attention; I will make the appropriate changes and restart testing.
There was a problem hiding this comment.
I will make the appropriate changes and restart testing.
It's probably best to hold off on testing for now and address all the other comments. Then test at the end
etc/kayobe/stackhpc.yml
Outdated
|
|
||
| # Pick build architecture for kolla and disk image builder | ||
| # Choose between x86_64 or arm64 | ||
| stackhpc_cpu_arch: 'x86_64' |
There was a problem hiding this comment.
It'd be better if we could evaluate this on a host-by-host basis. I think it'd be better to invert the relationship between this and kolla_base_arch i.e. leave kolla_base_arch as it was, and here say stackhpc_cpu_arch: "{{ 'arm64' if kolla_base_arch == 'aarch64' else kolla_base_arch }}"
There was a problem hiding this comment.
If we want to implement a host-by-host check then I think we should also include a manual override for this variable. This is because stackhpc_cpu_arch at the moment also allow users to build images for either cpu architecture regardless of the host's cpu architecture, and I think capability this should be retained.
There was a problem hiding this comment.
Agreed, though I don't think that changes the decision here. You'll always be able to override the variable no matter what it is.
|
We should preferably expand |
| vars: | ||
| local_image_path: /opt/kayobe/images/overcloud-{{ os_distribution }}-{{ os_release }}/overcloud-{{ os_distribution }}-{{ os_release }}.qcow2 | ||
| image_name: overcloud-{{ os_distribution }}-{{ os_release }} | ||
| image_name: overcloud-{{ os_distribution }}-{{ os_release }}-{{ cpu_platform }} |
There was a problem hiding this comment.
Does it mean X86 images will start getting published under a new URL? If so, this breaks a couple of variables, e.g. stackhpc_overcloud_host_image_url_no_auth
There was a problem hiding this comment.
Having had a look, this shouldn't impact the image URL as defined in stackhpc_overcloud_host_image_url. I have changed this to be a conditional variable to only change the name for arm64.
cityofships
left a comment
There was a problem hiding this comment.
We need the docs under doc/source/configuration/host-images.rst to be updated
No description provided.