[bug] aws rhel-ai create: AMI architecture hard-coded to x86_64, ARM64 instance types fail
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- aws, go
- Domain
- cloud, infrastructure
Research direction
Start with pkg/provider/aws/action/rhel-ai/constants.go:25 and the AMI lookup and instance-selection logic in rhelai.go:136, 140, and 288-298. Compare CLI architecture handling in cmd/mapt/cmd/aws/hosts/rhelai.go with rhel.go:77, then trace RHELAIArgs.Arch and rhelAIRequest.arch. Done means ARM64 instance types select a matching AMI, or an --arch value is consistently supported through filtering and instance selection.
Written by the indexing model from the issue text.
Description
When using aws rhel-ai create with ARM64 instance types (e.g. Graviton-based g5g.*), the provisioning fails because the AMI lookup is hard-coded to x86_64. The selected AMI architecture doesn't match the requested instance architecture.
Steps to Reproduce
mapt aws rhel-ai create \
--project-name test \
--backed-url file:///workspace \
--conn-details-output /workspace \
--version 3.4.0 \
--spot --spot-eviction-tolerance medium \
--compute-sizes g5g.xlarge,g5g.2xlarge,g5g.4xlarge
Error
error: sdk-v2/provider2.go:571: sdk.helper_schema: creating Auto Scaling Group (main-araid-asg-19f8de4):
operation error Auto Scaling: CreateAutoScalingGroup, api error ValidationError:
You must use a valid fully-formed launch template. The architecture 'arm64' of the specified instance type
does not match the architecture 'x86_64' of the specified AMI.
Root Cause (Opus says...)
The AMI architecture is hard-coded to "x86_64" in pkg/provider/aws/action/rhel-ai/constants.go:25 and used in all AMI lookups. Unlike aws rhel create, the aws rhel-ai create command does not expose an --arch flag.
Specifically:
- constants.go:25 defines amiArch = "x86_64" as a package-level variable
- rhelai.go lines 136, 140, 288-298 all use this hard-coded value for AMI filtering
- cmd/mapt/cmd/aws/hosts/rhelai.go does not register a --arch flag (compare with rhel.go:77)
- The RHELAIArgs.Arch field exists but is never populated from CLI flags, and its value is stored in rhelAIRequest.arch but never used
Expected Behavior
aws rhel-ai create should select the correct AMI based on the VM type it selects, or support an --arch flag, and use it when filtering AMIs/selecting instance types.
- Dominant language
- Go
- Stars
- 26
- Forks
- 41
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 27
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from redhat-developer/mapt
-
kind: v0.14.7 control-plane readiness block reads the wrong kubeconfig path (provision always fails)Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
redhat-developer/mapt#997 ·
Maintainers usually reply within 3 days
-
Host/username secret values contain trailing newlines, sanitization fix breaks SSH keyMay be free again @abdulazeem-tk4vr claimed this 167 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
redhat-developer/mapt#817 · 12 comments ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
redhat-developer/mapt#991 ·
Maintainers usually reply within 3 days
-
enhancement provider/AWS provider/IBMCLOUD target/openshift-snc
Difficulty 4/5 3-5 days Newbie friendliness 57/100
redhat-developer/mapt#990 ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
redhat-developer/mapt#974 ·
Maintainers usually reply within 3 days
All issues in redhat-developer/mapt
Similar issues
-
effort:s impact:low raised-by:reviewer risk:low
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
medici-finance/assay#8050 · 1 comment ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
factory:subtask
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
enhancement needs-triage service/licensemanager
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
hashicorp/terraform-provider-aws#51503 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100