Repository navigation
feat(fsx): explicit fail-closed lifecycle contract for --fsx-create (#193) - #197
Merged
Merged
Conversation
…193) An auto-created FSx is expensive and holds the only copy of results, so its lifetime must be stated, never inferred: - --fsx-create now REQUIRES --fsx-lifecycle ephemeral|durable; missing → error. - durable REQUIRES --fsx-ttl (no death-clock-less filesystem); ephemeral rejects a TTL (it's reaped with the instance via refcount, #192). - --fsx-lifecycle/--fsx-ttl without --fsx-create → error. Threads FSxLifecycle/FSxTTL through LaunchConfig (so the headless path #194 carries it) and FSxConfig; CreateFSxLustreFilesystem stamps spawn:fsx-lifecycle and, for durable, spawn:ttl-deadline (now+ttl) so the reaper has a deadline. New canonical doc docs/durable-storage-fsx.md leads with the lifetime decision table + per-lifetime cost (incl. the durable AZ-pinning tradeoff); the standalone `spawn fsx create --name` surface is marked as landing in #195. Tests: TestBuildLaunchConfig_FSxLifecycleContract (7 cases: missing lifecycle, durable w/o ttl, durable ok + threaded, ephemeral+ttl rejected, ephemeral ok, invalid lifecycle, lifecycle-without-create). cmd + pkg/aws green; vet/fmt clean. Closes #193
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #193. The user-facing contract layer of the FSx chain (gated by #192, which merged; drives #194 → lagotto#43).
The rule
An auto-created FSx is expensive (~$150–200/mo) and holds the only copy of results, so its lifetime is stated explicitly, never inferred or defaulted — fail-closed:
--fsx-createrequires--fsx-lifecycle ephemeral|durable; missing → error.durablerequires--fsx-ttl(no death-clock-less filesystem);ephemeralrejects a TTL (it's reaped with the instance via refcount, ttl-reaper must reclaim orphaned FSx Lustre filesystems (cost backstop; prerequisite for any FSx auto-create) #192).--fsx-lifecycle/--fsx-ttlwithout--fsx-create→ error.Wiring
LaunchConfig.FSxLifecycle/FSxTTL(so the headless launcher FSx ephemeral path: async-create + spored wait-and-mount (instance-owned, lagotto-safe) #194 carries the contract too) +FSxConfig.Lifecycle/TTLDeadline.CreateFSxLustreFilesystemstampsspawn:fsx-lifecycleand, fordurable,spawn:ttl-deadline = now+ttl— giving the reaper (ttl-reaper must reclaim orphaned FSx Lustre filesystems (cost backstop; prerequisite for any FSx auto-create) #192) an explicit deadline.Docs
New canonical
docs/durable-storage-fsx.md— leads with the lifetime decision table before any flags, the per-lifetime cost (incl. the durable AZ-pinning tradeoff vs. lagotto's capacity breadth), and the reaper's safety promise. lagotto's spawn-config docs will link here (single source of truth). The standalonespawn fsx create --namesurface is explicitly marked as landing in #195.Tests
TestBuildLaunchConfig_FSxLifecycleContract— 7 cases (missing lifecycle, durable w/o ttl, durable ok + threaded, ephemeral+ttl rejected, ephemeral ok, invalid lifecycle, lifecycle-without-create).cmd+pkg/awsgreen;go vet/gofmtclean.Unblocks #194 (ephemeral async-create path).