Skip to content

Batch dangling-instance SSM check#314

Open
scadu wants to merge 2 commits into
masterfrom
sup-6912-batch-ssm-sendcommand
Open

Batch dangling-instance SSM check#314
scadu wants to merge 2 commits into
masterfrom
sup-6912-batch-ssm-sendcommand

Conversation

@scadu
Copy link
Copy Markdown
Contributor

@scadu scadu commented May 29, 2026

checkAndMarkUnhealthy used to send one SendCommand per instance and poll
GetCommandInvocation in serial loop, so it got slower the more instances
there were.

This PR changes:

  1. DescribeInstanceInformation drops any instance whose SSM agent isn't
    Online (SendCommand would hang or fail anyway).
  2. One SendCommand targets all remaining instances.
  3. ListCommandInvocations is polled on a fixed interval until every invocation terminates or deadline elapses, and we act on results
    received by then.

Same outcome per instance: if the check reports NOT_RUNNING or the
invocation Failed, SetInstanceHealth marks it Unhealthy; MARKER_EXISTS is skipped.

scadu added 2 commits May 29, 2026 16:17
checkAndMarkUnhealthy used to send one SendCommand per instance and poll
GetCommandInvocation in serial loop, so it got slower the more instances
there were.

This PR changes:
1. DescribeInstanceInformation drops any instance whose SSM agent isn't
Online (SendCommand would hang or fail anyway).
2. One SendCommand targets all remaining instances.
3. ListCommandInvocations is polled on a fixed interval until every
invocation terminates or deadline elapses, and we act on results
received by then.

Same outcome per instance: if the check reports NOT_RUNNING or the
invocation Failed, SetInstanceHealth marks it Unhealthy; MARKER_EXISTS
is skipped.
@scadu scadu changed the title Sup 6912 batch ssm sendcommand Batch dangling-instance SSM check May 29, 2026
@scadu scadu marked this pull request as ready for review May 29, 2026 14:33
@scadu scadu requested a review from a team as a code owner May 29, 2026 14:33
@scadu scadu requested a review from petetomasik May 29, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant