[bug] aws rhel-ai create: AMI architecture hard-coded to x86_64, ARM64 instance types fail

未关闭
#901 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
aws, go

调研方向

从 pkg/provider/aws/action/rhel-ai/constants.go:25 以及 rhelai.go:136、140 和 288-298 中的 AMI 查找和实例选择逻辑开始。将 cmd/mapt/cmd/aws/hosts/rhelai.go 中的 CLI 架构处理与 rhel.go:77 进行比较,然后跟踪 RHELAIArgs.Arch 和 rhelAIRequest.arch。如果 ARM64 实例类型能够选择匹配的 AMI,或者 --arch 值能够通过筛选和实例选择得到一致支持,则视为完成。

由索引模型根据 Issue 内容生成。

描述

info-required os/RHEL-AI

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.

主要语言
Go
星标
25
派生
41
平均合并
5 天 3 小时
30 天内合并 PR
16

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

redhat-developer/mapt 的其他 Issue

查看 redhat-developer/mapt 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。