Repository navigation
feat(fsx): async create for ephemeral FSx on launch + spored DRA (#194 part 2) - #199
Merged
Merged
Conversation
…part 2) Completes the ephemeral-FSx path. --fsx-create --fsx-lifecycle ephemeral no longer blocks the launch on the ~10-min FSx provisioning: - pkg/aws: refactor CreateFSxLustreFilesystem into shared startFSxCreate (input + CreateFileSystem) + waitAndAssociateFSx (blocking wait + DRA). New CreateFSxLustreFilesystemAsync returns the fs-id immediately (no wait, no DRA). associateFSxS3 extracted (continuous NEW/CHANGED/DELETED export). - cmd/launch: ephemeral → async create (co-located in the instance's subnet), set config.FSxPending + import/export paths; durable → blocking as before. Lustre SG ports ensured up front for both paths. - buildTags: writes spawn:fsx-pending + mount-point + import/export when pending (not spawn:fsx-id; spored flips that after mounting). - spored: mountPendingFSx now sets up the S3 export DRA (createFSxS3Association, raw fsx SDK) after AVAILABLE and before mounting; best-effort (mounts anyway on DRA failure). Reads import/export paths from tags via provider.Config. Tests: buildTags writes fsx-pending (and not fsx-id) for the async path; existing lifecycle-contract + reaper + agent tests green. builds linux/darwin/windows; vet/fmt clean. Docs updated (ephemeral is now async/non-blocking). IAM (deploy-side): spored instance role needs fsx:CreateDataRepositoryAssociation and fsx:DescribeFileSystems. Closes #194
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Merged
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 #194 — the launch-side half (part 1, spored mount, merged in #198). Together these make
--fsx-create --fsx-lifecycle ephemeralfully non-blocking, which is what lagotto#43 needs.What
spawn launch --fsx-create --fsx-lifecycle ephemeralno longer blocks ~10 min on FSx provisioning:CreateFSxLustreFilesystemsplit intostartFSxCreate(paths/bucket/subnet +CreateFileSystem) +waitAndAssociateFSx(blocking wait + DRA). NewCreateFSxLustreFilesystemAsyncreturns thefs-idimmediately — no wait, no DRA.associateFSxS3extracted (continuous NEW/CHANGED/DELETED export).ephemeral→ async create (co-located in the instance's subnet for AZ-mountability) + setsconfig.FSxPendingand the import/export paths;durable→ blocking create as before. Lustre SG ports ensured up front for both.spawn:fsx-pending+ mount-point + import/export when pending (deliberately notspawn:fsx-id— spored flips that after it mounts, so the reaper refcount only counts a mounted instance).mountPendingFSx(from part 1) now sets up the S3 export DRA after AVAILABLE and before mounting — the decision from FSx ephemeral path: async-create + spored wait-and-mount (instance-owned, lagotto-safe) #194 (spored owns the DRA so launch never blocks). Best-effort: mounts anyway if the DRA call fails.Why DRA-on-spored
The export association can only be created once the FS is AVAILABLE; doing it launch-side would re-introduce the blocking wait. So spored does it — continuous export means results mirror to S3 as the job writes them (the #184 durability lesson), not a single end-of-job flush.
Tests
TestBuildTags_FSxPending(writes fsx-pending + paths, not fsx-id); existing lifecycle-contract, reaper, agent suites green. Builds linux/darwin/windows;go vet/gofmtclean.Caveats
--fsx-create --fsx-lifecycle ephemeralrun (paid, leak-checked) before the feature is announced.fsx:CreateDataRepositoryAssociation+fsx:DescribeFileSystems.Unblocks lagotto#43 (just forwarding the
fsx:block now).