Skip to content

Detached sweep members drop every non-tag RunInstances setting: volume_size, security groups, subnet/AZ, spot_max_price, hibernation, EFA, placement (#1330 follow-up) #1353

Closed

Description

@scttfrdmn

Found while fixing #1330. With that fix a detached (Lambda-orchestrated) sweep member carries the same tags a foreground member does. Its RunInstances request still carries almost nothing else from the member's config.

Evidence (code trace on branch fix/1330-1331-1327-detached-sweeps, not run on AWS)

buildRunInstancesInput (lambda/sweep-orchestrator/spored.go) sets only MinCount/MaxCount, InstanceType, UserData, IamInstanceProfile, TagSpecifications, ImageId, KeyName and, for spot: true, a bare InstanceMarketOptions{MarketType: spot}. The Lambda reads only ami, iam_role, instance_type, key_name, spot, spawn_user_data and spawn_tags from the params (TestDetachedSweepSeedsEveryKeyTheLambdaReads enforces that list).

Everything Client.Launch (pkg/aws/client.go) derives from the rest of the LaunchConfig is dropped on this path, for example:

Persistent Spot (#922) is the one I handled in #1330: such a member is now refused up front with a pointer at ttl: or --no-detach, because the orchestrator has no way to cancel a persistent request before terminating its instance (terminateUnverifiedMembers calls TerminateInstances directly), and an orphaned persistent request launches replacements.

Suggested

The same shape as #1323/#1330: render the RunInstances-side settings on the CLI (or a param the Lambda can apply verbatim), or refuse, before upload, a detached sweep whose members set something the orchestrator cannot apply, pointing at --no-detach. Persistent Spot additionally needs the cancel-before-terminate path in the orchestrator and ec2:CancelSpotInstanceRequests on the cross-account role.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions