From 1f03150b77e529385f03c6551d2e2a648f44d5fe Mon Sep 17 00:00:00 2001 From: Chris Thach <12981621+cthach@users.noreply.github.com> Date: Wed, 4 Nov 2026 17:58:49 -0500 Subject: [PATCH] fix: Poll Teleport readyz instead of fixed 10 second sleep. (#18461) Signed-off-by: Chris Thach --- install/teleport-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/teleport-install.sh b/install/teleport-install.sh index c98bcb466..6e542c9a3 100644 --- a/install/teleport-install.sh +++ b/install/teleport-install.sh @@ -24,7 +24,11 @@ msg_info "Configuring Teleport" $STD apt install -y teleport $STD teleport configure -o /etc/teleport.yaml systemctl enable -q --now teleport -sleep 10 +SECONDS=0 +until teleport debug readyz &>/dev/null; do + sleep 2 + ((SECONDS >= 120)) && { msg_error "Teleport did not become ready in time"; exit 1; } +done tctl users add teleport-admin --roles=editor,access --logins=root >~/teleportadmin.txt sed -i "s|https://[^:]*:3080|https://${LOCAL_IP}:3080|g" ~/teleportadmin.txt msg_ok "Configured Teleport"