Skip to content

EC2: add cluster placement group actions (CreatePlacementGroup / DescribePlacementGroups / DeletePlacementGroup) #344

Closed

Description

@scttfrdmn

Summary

The EC2 emulator plugin (emulator/ec2_plugin.go) doesn't handle any placement-group actions — CreatePlacementGroup, DescribePlacementGroups, DeletePlacementGroup are absent from the action dispatch (which does handle RunInstances, Describe/Terminate/Start/StopInstances, DescribeAvailabilityZones, DescribeInstanceTypes, VPC/subnet/SG, etc.).

Why

spawn's MPI/HPC launch path creates a cluster placement group and launches instances into it. With the cohort-based MPI work, spawn now creates a per-AZ placement group on demand as it advances an AZ-fallback chain (CreatePlacementGroup → launch → on abandon DeletePlacementGroup). Because these actions aren't emulated, any spawn launch --mpi (with auto/explicit placement group) can't be exercised end-to-end against Substrate — the substrate-tier e2e has to disable placement groups (--auto-placement-group=false) or route MPI validation to real AWS.

Ask

Handle the three actions with enough fidelity for launch flows:

  • CreatePlacementGroup — accept GroupName + Strategy (esp. cluster), store it, return success. Idempotent-friendly: a repeat create of the same name can return InvalidPlacementGroup.Duplicate (spawn treats "already exists" as success) or succeed.
  • DescribePlacementGroups — return created groups (by GroupNames filter), with State=available (spawn polls for available before launching to dodge InvalidPlacementGroup.Unknown).
  • DeletePlacementGroup — remove by name; return success (optionally error if instances still reference it).
  • RunInstances — accept Placement.GroupName referencing a known group (ideally 404 → InvalidPlacementGroup.Unknown for an unknown name, so the create→poll→launch ordering is testable).

Context

Found while adding the cohort MPI integration to spawn (per-AZ lazy placement groups). Related to the SSM Run Command execution gap I'm filing separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ec2type: feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions