fix: support Graviton (aarch64) bare metal instance types#75
Conversation
|
Skipping CI for Draft Pull Request. |
WalkthroughThis PR extends AWS hypervisor and OpenShift deployment infrastructure to support aarch64/Graviton instances. Configuration templates, AMI filtering logic, metal instance detection, and Metal3 image documentation are updated to enable deployment targeting aarch64 architecture alongside existing x86_64 support. Changesaarch64 Graviton Instance Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 9 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fonta-rh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
45b4fa3 to
7be2b57
Compare
|
/hold depends on dev-scripts and metal3-dev-env PRs |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_fencing_example.sh`:
- Around line 32-38: The arm64 Metal3 override block in
config_fencing_example.sh incorrectly suggests setting IRONIC_IMAGE, VBMC_IMAGE,
SUSHY_TOOLS_IMAGE and referencing helpers/build-metal3-arm64.sh; update this
example to match upstream dev-scripts by removing those commented env vars and
helper reference and instead instruct users to override OPENSHIFT_RELEASE_IMAGE
for arm64 (or reference the correct upstream helper/variable if you prefer that
upstream alternative). Locate the aarch64 block (symbols: IRONIC_IMAGE,
VBMC_IMAGE, SUSHY_TOOLS_IMAGE, helpers/build-metal3-arm64.sh,
OPENSHIFT_RELEASE_IMAGE) and replace the content with a concise comment that
mirrors upstream guidance: "Do not use for arm64; override
OPENSHIFT_RELEASE_IMAGE" (or point to the proper upstream helper) so the example
is accurate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: ae8a62bc-f711-4514-b5a3-8b32386d4132
📒 Files selected for processing (4)
deploy/aws-hypervisor/instance.env.templatedeploy/aws-hypervisor/scripts/common.shdeploy/aws-hypervisor/scripts/create.shdeploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_fencing_example.sh
- Broaden metal-detection regex from c-family-only to any .metal suffix, covering Graviton types like c7g.metal, m7g.metal, r7g.metal - Fix AMI auto-detect for aarch64: map aarch64 → arm64 to match AWS naming convention, and drop GA-only filter that excluded arm64 AMIs - Add Graviton hints to instance.env.template - Add commented-out aarch64 Metal3 image overrides to fencing example config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7be2b57 to
1b7fea1
Compare
|
Thanks for the PR, Pablo. Code reviewFound 2 issues:
two-node-toolbox/deploy/aws-hypervisor/scripts/common.sh Lines 72 to 77 in 1b7fea1
two-node-toolbox/deploy/aws-hypervisor/scripts/common.sh Lines 59 to 66 in 1b7fea1 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
Thanks for looking at this, Luca. Some context on both findings: 1. AMI filter —
|
|
Both explanations hold up:
Thanks for the context. LGTM. |
|
/lgtm |
Document Graviton configuration in deploy/aws-hypervisor/README.md: instance.env settings, Metal3 image overrides, and known limitations. Add build-metal3-arm64.sh documentation to helpers/README.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
deploy/aws-hypervisor/README.md (1)
121-121: ⚡ Quick winRemove marketing language about cost savings; focus on technical capability.
The cost comparison (
~40% cheaper, hourly rates$2.32/hr vs $3.89/hr) is marketing language that violates the README guidelines requiring "technical and concise" documentation. Replace with straightforward technical statement of support for the instance types. Additionally, use the hyphenated form "bare-metal instances" when the compound adjective modifies the noun.🛠️ Proposed update
-This toolbox supports AWS Graviton bare metal instances (`c7g.metal`, `m7g.metal`, `r7g.metal`) as hypervisors. Graviton instances are ~40% cheaper than equivalent x86_64 instances (e.g., `c7g.metal` at $2.32/hr vs `c5n.metal` at $3.89/hr). +This toolbox supports AWS Graviton bare-metal instances (`c7g.metal`, `m7g.metal`, `r7g.metal`) as hypervisors.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@deploy/aws-hypervisor/README.md` at line 121, Remove the marketing language from the sentence that discusses AWS Graviton bare metal instances, specifically the cost comparison metrics (the percentage savings and hourly rate prices for c7g.metal vs c5n.metal). Replace this section with a straightforward technical statement that simply lists the supported Graviton instance types (c7g.metal, m7g.metal, r7g.metal) without the cost justification. Additionally, change "bare metal instances" to "bare-metal instances" to use the properly hyphenated compound adjective form when modifying the noun.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@deploy/aws-hypervisor/README.md`:
- Line 121: Remove the marketing language from the sentence that discusses AWS
Graviton bare metal instances, specifically the cost comparison metrics (the
percentage savings and hourly rate prices for c7g.metal vs c5n.metal). Replace
this section with a straightforward technical statement that simply lists the
supported Graviton instance types (c7g.metal, m7g.metal, r7g.metal) without the
cost justification. Additionally, change "bare metal instances" to "bare-metal
instances" to use the properly hyphenated compound adjective form when modifying
the noun.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 79dccdc0-37f9-44f7-8cb8-47b483b2fb71
📒 Files selected for processing (2)
deploy/aws-hypervisor/README.mdhelpers/README.md
✅ Files skipped from review due to trivial changes (1)
- helpers/README.md
|
/lgtm |
Summary
c[0-9]+[a-z]*.metal(c-family only) to\.metal$, covering all bare metal instance types including Graviton (c7g.metal,m7g.metal,r7g.metal)get_ami_arch()to mapaarch64→arm64(AWS usesarm64in AMI names), and remove*GA*filter that excluded all arm64 AMIs (and limited x86_64 to an older GA build)instance.env.templatedeploy/aws-hypervisor/README.md(configuration, Metal3 image overrides, known limitations)build-metal3-arm64.shinhelpers/README.mdDepends on #73 (branched from
openshift-clusters-common-sh).Test plan
make shellcheckpassesRHEL_HOST_ARCHITECTURE=x86_64RHEL_HOST_ARCHITECTURE=aarch64c5n.metal,c7g.metal,m7g.metal,r7g.metal,i3.metalc5n.xlarge,m5.2xlargemake create+make destroyon a Graviton instance type (e.g.c7g.metal)🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Bug Fixes
.metalnaming patterns.Documentation