Skip to content

Add teleport debug readyz command#62491

Merged
wethreetrees merged 1 commit intomasterfrom
wethreetrees/teleport-cli-debug-readyz
Dec 30, 2025
Merged

Add teleport debug readyz command#62491
wethreetrees merged 1 commit intomasterfrom
wethreetrees/teleport-cli-debug-readyz

Conversation

@wethreetrees
Copy link
Copy Markdown
Contributor

@wethreetrees wethreetrees commented Dec 24, 2025

Purpose

Adds a command to the teleport cli to query the /readyz endpoint to accommodate restricted environments, e.g. curl unavailable.

resolves #62176

Notes

Exits with code 0 and prints to stdout on success
Exits with non-zero code and prints readyz status or associated error to stderr on failure

Manual Testing

The below snippets will work for a quick validation of both good and bad cases. There seemed to be little benefit to automated tests, as the logic is very simple and we'd be mocking the service side.

Sample testing output can be found here: #62491 (comment)

  1. Start teleport and run the new teleport debug readyz command before it's ready.
# hacky, but should hit before the service is ready
./build/teleport start &
teleport_pid=$!
sleep 0.5
./build/teleport debug readyz
  1. Wait a few seconds for the service to be ready and then run again to see the "success" case.
./build/teleport debug readyz
  1. Cleanup the teleport process.
kill $teleport_pid

changelog: Added teleport debug readyz command

@wethreetrees
Copy link
Copy Markdown
Contributor Author

Manual Testing Output

Bad case (not ready)

image

Good case (ready)

image

@wethreetrees wethreetrees force-pushed the wethreetrees/teleport-cli-debug-readyz branch from 281f878 to 158cfd1 Compare December 30, 2025 02:34
@wethreetrees wethreetrees marked this pull request as ready for review December 30, 2025 04:14
@wethreetrees wethreetrees force-pushed the wethreetrees/teleport-cli-debug-readyz branch from 158cfd1 to 3b5522b Compare December 30, 2025 04:26
@okraport okraport requested a review from fspmarshall December 30, 2025 14:36
@wethreetrees wethreetrees force-pushed the wethreetrees/teleport-cli-debug-readyz branch from 3b5522b to 31d745b Compare December 30, 2025 15:05
@wethreetrees wethreetrees added this pull request to the merge queue Dec 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 30, 2025
@wethreetrees wethreetrees added this pull request to the merge queue Dec 30, 2025
Merged via the queue into master with commit 737899d Dec 30, 2025
43 of 44 checks passed
@wethreetrees wethreetrees deleted the wethreetrees/teleport-cli-debug-readyz branch December 30, 2025 17:05
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@wethreetrees See the table below for backport results.

Branch Result
branch/v18 Create PR

@taraspos
Copy link
Copy Markdown
Contributor

This is super useful for health-checking Teleport Agents running on ECS Fargate, thanks!

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.

Add teleport debug readyz command

5 participants