Skip to content

FSx auto-create: explicit lifecycle contract (ephemeral|durable), fail-closed, + canonical docs #193

Closed

Description

@scttfrdmn

Design record + umbrella for letting spawn create an FSx Lustre filesystem (not just mount one), with lifecycle stated explicitly by the user. Drives lagotto#43.

Principle: the user names the lifetime, or it doesn't launch

An FSx Lustre FS costs real money (~$150–200/mo, 1.2 TB PERSISTENT_2) and holds the only copy of results. Its lifetime must never be inferred (e.g. from whether a name field is present) — that's how you get "I didn't realize it would delete that" / "I didn't realize it kept billing." So fsx.create requires an explicit lifecycle; missing it is a hard error, not a default.

The contract

fsx:
  create: true
  lifecycle: ephemeral        # REQUIRED: ephemeral | durable
  s3_bucket: aws-buckai
  export_path: s3://aws-buckai/.../detections/
  # durable also REQUIRES:
  # ttl: 30d
User writes Meaning Reaped when
create + lifecycle: ephemeral make one, throw away with this job instance terminates (refcount → 0)
create + lifecycle: durable + ttl: 30d persists across launches refcount 0 AND past TTL
id: / name: (existing) mount what already exists (today's behavior) not spawn's to reap; refcount-protected while mounted
create with no lifecycle error — choose a lifecycle —

Canonical docs (the load-bearing part)

One "Durable storage & FSx" section, canonical in spawn, lagotto's spawn-config docs cross-link to it (single source of truth for the lifetime rules). Outline:

  1. Pick a lifetime first — the decision table above, before any YAML.
  2. Cost callout (prominent): FSx bills whether or not a job uses it; ephemeral ties cost to one job, durable bills until TTL — set it deliberately.
  3. What ephemeral guarantees — reaped on terminate; results must reach S3 via the export DRA before teardown (link --pre-stop does not reliably flush before TTL-triggered terminate → data loss on ephemeral storage #184).
  4. What durable costs — survives crashes / capacity-never-came / everything except its TTL.
  5. Mount-existing — fsx.id, no creation, for out-of-band-managed FSx.
  6. The reaper's promise — every spawn-created FSx is refcount-tracked + TTL-backstopped; nothing leaks silently (ttl-reaper must reclaim orphaned FSx Lustre filesystems (cost backstop; prerequisite for any FSx auto-create) #192).

Sub-work

Blocked by #192. Relates to lagotto#43, #184, #72.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:costarea:launcharea:storageenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions