clusterinthecloud / ansible

Ansible config for Cluster in the Cloud
https://cluster-in-the-cloud.readthedocs.io
MIT License
10 stars 27 forks source link

failed to create aarch64 node image because a1.medium is not available in eu-west-1b #99

Closed boegel closed 3 years ago

boegel commented 3 years ago

When running sudo /usr/local/bin/run-packer aarch64 to create a node image for ARM64 compute node, I ran into the following problem:

==> Some builds didn't complete successfully and had errors:
--> amazon-ebs.aws: Error launching source instance: Unsupported: Your requested instance type (a1.medium) is not supported in your requested Availability Zone (eu-west-1b). Please retry your request by not specifying an Availability Zone or choosing eu-west-1a, eu-west-1c.
    status code: 400, request id: <snip>

I was able to dance around this by editing /usr/local/bin/run-packer and changing a1.medium to c6g.medium.

So apparently a1.medium is not available in all AWS availability zones...

I'm not sure if or how this can be totally avoided. Perhaps the AWS API can be consulted to check whether a1.medium is supported in whichever availability zone the cluster was created in, and fall back to other (perhaps slightly more expensive) fallback options (like c6g.medium)? It makes sense to prefer a1.medium of course, since it's cheaper than c6g.medium...

milliams commented 3 years ago

For now I have changed the image build to run on an m6g.medium by default. It only runs for a few minutes and so the cost should not make much difference. I believe that they are more readily available.