Repository navigation
fcvm-fleet: a pool of stopped EC2 tiles the coordinator starts at a wake - #674
Conversation
The coordinator in ejc3/fcvm#1273 keeps its EC2 tiles stopped between wakes (--ec2-pool) and starts them at the next one instead of launching: on g4dn.xlarge from the tile AMI a stopped tile reached its first frame in 15.5 s (persistent spot) against 81 to 84 s for a launch (2026-10-25). g4dn has no hibernation and Auto Scaling warm pools take no spot. - modules/fcvm-fleet-region: launch template fcvm-fleet-tile-pool-<arch>, the spot tile with a persistent request that stops on interruption, its spot request tagged Purpose=fcvm-fleet-tile; in tile_template_arns, so RunInstances may use it. - The coordinator's role: StartInstances/StopInstances and CreateTags/DeleteTags (keys FleetPool and FleetTile only) on instances tagged Purpose=fcvm-fleet-tile, and CancelSpotInstanceRequests on requests so tagged (a persistent request launches a replacement when its instance is terminated, so the coordinator cancels it first). - Coordinator arguments --ec2-pool 8 --ec2-pool-template fcvm-fleet-tile-pool-x86_64 behind local.fcvm_fleet_tile_pool. Standing cost: 8 stopped 32 GB gp3 root volumes, $20.48 a month; no Elastic IPs. Tested: python3 scripts/test-fcvm-fleet.py (39 tests OK, 3 new), terraform fmt. terraform validate was not run here: this box has 1.16.6 and main.tf pins 1.10.3.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 47 minutes. View limit details
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Fixed the persistent Spot request authorization: tagged spot-request resources have their own region/Purpose grant, while instance, volume, ENI, AMI, subnet and template restrictions remain. Independent code/security review passed; 39 focused tests and 11 read-only IAM simulations passed, including 7 deny cases. Updated against current main. |
|
@codex review |
|
@codex security review |
|
@coderabbitai review |
|
@greptileai review |
|
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…authorization # Conflicts: # fcvm-fleet.tf
|
@codex review |
|
@codex security review |
|
@coderabbitai review |
|
@greptileai review |
|
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Draft until ejc3/fcvm#1273 is on main and the staging coordinator image has
--ec2-pool. The arguments this adds would stop an older coordinator (an unknown flag). Then mark ready for the jumpbox.Why
Every wake launches the 8 EC2 tiles from scratch: 43 to 52 s from launch to ready on staging (2026-10-25), and the viewer's first picture waits for them. Measured on g4dn.xlarge from the current tile AMI (request to
/healthreporting ready with a frame drawn):g4dn does not support hibernation, and Auto Scaling warm pools take no spot instances, so the coordinator keeps its own pool (ejc3/fcvm#1273).
What changes
modules/fcvm-fleet-region: launch templatefcvm-fleet-tile-pool-<arch>, the spot tile with a persistent request that stops on interruption; its spot request is taggedPurpose=fcvm-fleet-tile. Added totile_template_arns, which limits the coordinator's RunInstances.StartInstances/StopInstancesandCreateTags/DeleteTags(tag keysFleetPool,FleetTileonly) on instances taggedPurpose=fcvm-fleet-tile;CancelSpotInstanceRequestson requests so tagged. The coordinator cancels a persistent request before terminating its instance, or the request launches a replacement.--ec2-pool 8 --ec2-pool-template fcvm-fleet-tile-pool-x86_64behindlocal.fcvm_fleet_tile_pool.Cost
8 stopped 32 GB gp3 root volumes: $20.48 a month. No Elastic IPs: a started tile gets a new public address, which the coordinator names in DNS as for a launch. Tiles stay spot while running.
Tested
python3 scripts/test-fcvm-fleet.py: 39 tests OK, 3 new (TilePool).terraform fmt. Not run:terraform validate(this box has Terraform 1.16.6;main.tfpins 1.10.3).Trial after apply
One wake on staging with the pool warm (a sleep first fills it): the coordinator logs
tile resumed from the poolandtile readyper tile (ejc3/fcvm#1261 adds the latter); expected ready about 15 to 20 s after the wake instead of 43 to 52 s.Part of ejc3/fcvm#1257.