Skip to content

gpubox: launch as fcvm-fleet-gpubox, which reads no secret; AMI builds are factory-only - #1979

Merged
ejc3 merged 2 commits into
mainfrom
fleet-gpubox-own-profile
Nov 21, 2026
Merged

ejc3 merged 2 commits into
mainfrom
fleet-gpubox-own-profile

Conversation

@ejc3

@ejc3 ejc3 commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

gpubox.sh launched boxes with the fleet's host profile, which reads the fleet certificate and the agents' Access token. A gpubox needs neither:

  • its agent unit starts only with the agent.env that a fleet host's boot writes;
  • fcvm-fleet-vfio and fcvm-fleet-store use no secret.

ejc3/aws#934 narrows fcvm-fleet-terraform to gpubox's calls (#922) and adds the fcvm-fleet-gpubox profile. The owner chose factory-only AMI builds on 2026-11-21.

  • fleet/tools/gpubox.sh: --iam-instance-profile Name=fcvm-fleet-gpubox, and the header says what the role and the box may do.
  • fleet/ami/README.md: records the decision. A dev box's role no longer launches builders, creates images or runs measure-boot.sh. The hand build stays as the reference for the build.sh phases that the factory runs.

Merge after ejc3/aws#934 is applied, because that apply creates the profile.

Contract: gpubox launches under a profile with no secret access.
Downstream impact: developer tooling only.
Evidence: bash fleet/ami/check.sh exits 0, including shellcheck, and python3 -B fleet/tools/test_tools.py is OK. Live check after the apply: up, run, copy and down.

Admission with restricted S3 permissions

The companion AWS role can read and write gpubox/* objects but cannot list the bucket. S3 returns 403 for an absent ledger under that policy. The client now uses a conditional empty-object create to establish an absent ledger and requires a successful read afterward. When a lock disappears between a competing create and a read, the client retries its conditional acquisition once. It still refuses a launch if existing lock or ledger state cannot be read.

Both regressions failed before the fix. All 51 operator-tool tests and the offline AMI checks passed on ARM, including the warning-level ShellCheck gate. A targeted test verified that an unreadable existing ledger or lock keeps its contents and no instance is launched. Deploy the AWS role first, then verify the normal GPU launch, commands, copy and termination against it.

Summary by CodeRabbit

  • Documentation
    • Clarified that the gpubox role manages only gpubox instances, which can read release artifacts but do not access fleet secrets.
    • Updated build guidance to state that images are built by the image factory; manual host and tile build steps remain as reference.
    • Clarified that the dev-box Terraform role no longer launches builders, creates images, or runs boot measurement. Those operations are handled by host and tile roles.

…s are factory-only

gpubox.sh launched boxes with the fleet's host profile, which reads the
fleet certificate and the agents' Access token. A gpubox needs neither:
its agent unit starts only with the agent.env a fleet host's boot writes,
and fcvm-fleet-vfio and fcvm-fleet-store use no secret. ejc3/aws (#922)
narrows fcvm-fleet-terraform to gpubox's calls and adds the
fcvm-fleet-gpubox profile.

- fleet/tools/gpubox.sh: --iam-instance-profile Name=fcvm-fleet-gpubox, and
  the header says what the role and the box may do.
- fleet/ami/README.md: the owner's 2026-11-21 decision. The image factory
  builds images. A dev box's role no longer launches builders, creates
  images or runs measure-boot.sh, and the hand build stays as the
  reference for the build.sh phases the factory runs.

Tested: bash fleet/ami/check.sh (exit 0, shellcheck included);
python3 -B fleet/tools/test_tools.py (OK).
@cloud-world-model

cloud-world-model Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

☁️ Cloud World Model — Infrastructure Simulation Report

Matching GitHub Check

⚠️ CWM received this pull request, but cannot simulate it because the GitHub App installation is not linked to a CWM workspace.

No simulation was run and no credits were consumed. Link this installation, then re-run the check.


Powered by Cloud World Model · Manage settings

@ejc3

ejc3 commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T01:25:37.411511Z 04b476f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The gpubox launch configuration now attaches the fcvm-fleet-gpubox IAM profile instead of fcvm-fleet-host. The README and script comments describe role permissions, secret access, and image-building responsibilities.

Changes: Gpubox Role Assignment

Layer / File(s) Summary
Gpubox profile and role scope
fleet/tools/gpubox.sh, fleet/ami/README.md
The launch configuration uses the fcvm-fleet-gpubox profile. Comments and README text describe the stated role permissions and secret access, and document that image builds are factory-only. The README retains the hand-build procedure as a reference for factory-run host and tile phases.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

  • ejc3/fcvm#1468: Implements the factory pipeline for AMI builds, which is the build path described by this PR.
Merge Risk: Low · up to b9832

This switches gpubox launches to a profile that cannot read fleet secrets. Merge only after the profile exists and a live up/run/copy/down check passes, since the profile's permissions could not be checked from this repository.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: gpubox instances now launch under the fcvm-fleet-gpubox profile, which reads no secret. It also names the second change, that AMI builds are factory-only. Both points …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the main change: gpubox instances now launch under the fcvm-fleet-gpubox profile, which reads no secret. It also names the second change, that AMI builds are factory-only. Both points appear in the raw summary and the objectives. The title is long at 87 characters, but it is specific and matches the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f8f699c-3e48-438f-9c6a-a4044c885b28
Commits

Reviewing files that changed from the base of the PR and between cece90a and b9832f9.

Files selected for processing: 2

  • fleet/ami/README.md
  • fleet/tools/gpubox.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: b9832f984a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ejc3

ejc3 commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

NOT-A-DEFECT: CodeRabbit reports no actionable comments. Its merge note matches the plan: merge only after ejc3/aws#934 has created the fcvm-fleet-gpubox profile, followed by a live up/run/copy/down. Cloud World Model ran no simulation (its app is not linked to a workspace) and claims no defect.

@ejc3

ejc3 commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

I’m picking up the admission compatibility change identified in the AWS role review on this branch. I’ll add regression coverage for a missing ledger and a lock that disappears during contention. I’ll leave the profile migration and deployment sequencing with the current owners.

Conditionally create an empty admission ledger after an ambiguous S3 403 and require a successful read before reserving capacity. Retry conditional lock acquisition once if a lock disappears before its read.

Extend the fake S3 tests to cover restricted missing-key responses, a disappearing lock, and preservation of unreadable lock and ledger contents.
@cloud-world-model

cloud-world-model Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

☁️ Cloud World Model — Infrastructure Simulation Report

Matching GitHub Check

⚠️ CWM received this pull request, but cannot simulate it because the GitHub App installation is not linked to a CWM workspace.

No simulation was run and no credits were consumed. Link this installation, then re-run the check.


Powered by Cloud World Model · Manage settings

@ejc3

ejc3 commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 04b476f422

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ejc3

ejc3 commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

NOT-A-DEFECT: the 01:14 comment is a status note. The admission change it describes is 04b476f, which Codex reviewed with no findings. Cloud World Model ran no simulation (its app is not linked to a workspace). CodeRabbit's walkthrough reports no actionable comments. None of the three claims a defect.

@ejc3
ejc3 merged commit 382558a into main Nov 21, 2026
12 of 15 checks passed
@ejc3
ejc3 deleted the fleet-gpubox-own-profile branch November 21, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant