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

ibmcloud: selectInstanceProfile and selectImage incorrectly handle "architecture" requirements #1795

Open
skaegi opened this issue Apr 14, 2024 · 0 comments

Comments

@skaegi
Copy link

skaegi commented Apr 14, 2024

We provide both amd64 and s390x instance profiles as well as amd64 and s390x images.

IBMCLOUD_PODVM_IMAGE_ID: r018-...(amd64-image-id),r018-...(s390x-image-id)
IBMCLOUD_PODVM_INSTANCE_PROFILE_LIST: bx2-2x8,bz2-2x8

If we use the "machine_type" annotation to select bz2-2x8 when CreateInstance is called then selectInstanceProfile will choose the correct vm flavour however selectImage will incorrectly choose the first (amd64) image as the spec.Arch check it does does not have the correct information. The creation will fail later with...

[adaptor/cloud] creating an instance : Image OS architecture amd64 is not supported by the instance profile bz2-2x8

To fix this:

  1. updateInstanceProfileSpecList should populate the InstanceTypeSpecs with Arch from the GetInstanceProfileWithContext result
  2. In CreateInstance after calling selectInstanceProfile the incoming spec should be merged with the instanceProfile spec
  3. Call getImage with the new merged spec
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

No branches or pull requests

1 participant