Skip to content

Fix error reporting in EC2 auto discovery#59908

Merged
marcoandredinis merged 1 commit intomasterfrom
marco/ec2_discovery_report_errors
Oct 6, 2025
Merged

Fix error reporting in EC2 auto discovery#59908
marcoandredinis merged 1 commit intomasterfrom
marco/ec2_discovery_report_errors

Conversation

@marcoandredinis
Copy link
Copy Markdown
Contributor

@marcoandredinis marcoandredinis commented Oct 3, 2025

To auto discover EC2 instances, the Discovery Service calls ssm.SendCommand to multiple instances.

Then, it will wait for the command to be executed.
The waiter will check for the output of the execution and:

  • return an error when the command execution takes too long (waiter waits up to 100s)
  • return an error when it fails to check for status (eg, network issues, permission issues, ...)
  • return an error when the command fails

The last case was not being handled gracefully.
So, the Discovery Service would assume it's an unknown error and bubble up.
This meant not error reporting: neither in logs, nor in audit log.

This PR changes the flow, so that command failures are handled gracefully.
This will ensure the audit log gets an entry which identifies the problem.

image

changelog: Fix EC2 auto discovery report of failed installations.

@marcoandredinis marcoandredinis force-pushed the marco/ec2_discovery_report_errors branch 3 times, most recently from 645ec45 to 0887a46 Compare October 6, 2025 09:56
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from kiosion October 6, 2025 13:34
@marcoandredinis marcoandredinis force-pushed the marco/ec2_discovery_report_errors branch from 0887a46 to b4f17e6 Compare October 6, 2025 13:58
@marcoandredinis marcoandredinis added this pull request to the merge queue Oct 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 6, 2025
@marcoandredinis marcoandredinis force-pushed the marco/ec2_discovery_report_errors branch from b4f17e6 to c4ed05d Compare October 6, 2025 15:27
@marcoandredinis marcoandredinis added this pull request to the merge queue Oct 6, 2025
Merged via the queue into master with commit ae559fd Oct 6, 2025
40 checks passed
@marcoandredinis marcoandredinis deleted the marco/ec2_discovery_report_errors branch October 6, 2025 16:09
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@marcoandredinis See the table below for backport results.

Branch Result
branch/v18 Create PR

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants