clusterinthecloud / ansible

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

No AMI found when trying to build aarch64 node image for AWS CitC cluster #103

Closed boegel closed 3 years ago

boegel commented 3 years ago

sudo /usr/local/bin/run-packer aarch64 fails because the base AMI is not found.

The problem seems to be the architecture part of the filter, which includes escaped double quotes:

==> amazon-ebs.aws: No AMI was found matching filters: {
==> amazon-ebs.aws:   Filters: [{
==> amazon-ebs.aws:       Name: "architecture",
==> amazon-ebs.aws:       Values: ["\"arm64\""]
...

I was able to dance around this issue by changing this line in /etc/citc/packer/all.pkr.hcl:

architecture = var.aws_arch

to:

architecture = "arm64"

Full output:

``` [citc@mgmt ~]$ sudo /usr/local/bin/run-packer aarch64 amazon-ebs.aws: output will be in this color. ==> amazon-ebs.aws: Force Deregister flag found, skipping prevalidating AMI Name ==> amazon-ebs.aws: No AMI was found matching filters: { ==> amazon-ebs.aws: Filters: [{ ==> amazon-ebs.aws: Name: "architecture", ==> amazon-ebs.aws: Values: ["\"arm64\""] ==> amazon-ebs.aws: },{ ==> amazon-ebs.aws: Name: "name", ==> amazon-ebs.aws: Values: ["CentOS 8.*"] ==> amazon-ebs.aws: }], ==> amazon-ebs.aws: Owners: ["125523088429"] ==> amazon-ebs.aws: } Build 'amazon-ebs.aws' errored after 203 milliseconds 886 microseconds: No AMI was found matching filters: { Filters: [{ Name: "architecture", Values: ["\"arm64\""] },{ Name: "name", Values: ["CentOS 8.*"] }], Owners: ["125523088429"] } ==> Wait completed after 203 milliseconds 942 microseconds ==> Some builds didn't complete successfully and had errors: --> amazon-ebs.aws: No AMI was found matching filters: { Filters: [{ Name: "architecture", Values: ["\"arm64\""] },{ Name: "name", Values: ["CentOS 8.*"] }], Owners: ["125523088429"] } ==> Builds finished but no artifacts were created. ```
willfurnass commented 3 years ago

104 might help with this

milliams commented 3 years ago

Thanks for the report. I've just merged #104 which fixes this.