Repository navigation
Guarantee SSM on every instance profile (MPI cohort Stage 0) - #370
Merged
Merged
Conversation
…tage 0) spore.host baseline: every spawn-launched instance must be SSM-capable. The MPI cohort's control-plane peer assembly and readiness probes run over SSM with no on-instance fallback, and `spawn connect` already relies on it. - Add ensureSSMManagedPolicy: idempotent AttachRolePolicy of AmazonSSMManagedInstanceCore, returning an error on failure. - Default spored role (SetupSporedIAMRole): the attach is now a hard error instead of a logged warning. - Custom --iam-role path (CreateOrGetInstanceProfile): also attach SSM core, for both freshly-created and pre-existing roles. Batch-queue's raw --iam-role (used as a pre-existing profile name) is unchanged and documented in the CHANGELOG as the caller's responsibility. Stage 0 of the cohort MPI integration (plan: majestic-enchanting-kernighan).
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.
Stage 0 of the cohort MPI integration (plan: full cohort adoption for MPI/collective launches). Foundational and independently valuable — makes SSM reliable on every spawn'd instance.
Why
The MPI cohort work (upcoming stages) assembles peers and probes readiness over SSM with no on-instance fallback, so SSM must be present on every node. Today it's only best-effort: the default
sporedrole attachesAmazonSSMManagedInstanceCorebut swallows failures as a warning (iam.go), and the custom--iam-rolepath doesn't attach it at all. This also makesspawn connect's SSM fallback reliable everywhere.Change
ensureSSMManagedPolicy— idempotentAttachRolePolicyofAmazonSSMManagedInstanceCore, returns an error on failure.SetupSporedIAMRole): attach is now a hard error instead of a logged warning.--iam-role/policy path (CreateOrGetInstanceProfile): attaches SSM core too, for both new and pre-existing roles.--iam-role(used directly as a pre-existing profile name, bypassing role creation) is unchanged — documented in CHANGELOG as the caller's responsibility.Verification
go build ./...,go vet,gofmt, andpkg/awstests pass. No new lint findings in changed files (the 36 pre-existingmake checkstaticcheck findings are all in untouched files). IAM SDK paths have no interface seam in this codebase (consistent with existing tests being pure policy-doc logic), so this is covered by the existing build/vet gate + the upcoming Stage 4/5 e2e that exercises SSM end-to-end.Part of the cohort MPI integration; no behavior change to launches beyond the guaranteed SSM attach.