From 8dc8e861ea7b6ee9aae8711c80a941617a4b50af Mon Sep 17 00:00:00 2001 From: Hugo Shaka Date: Thu, 20 Jun 2024 14:51:08 -0400 Subject: [PATCH] [v14] Mark Discovery service healthy on startup (#43285) * Mark Discovery service healthy on startup * bump e --- e | 2 +- lib/service/discovery.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/e b/e index a3a88c2c15b3f..c937c071297b0 160000 --- a/e +++ b/e @@ -1 +1 @@ -Subproject commit a3a88c2c15b3fa6188e85852c784e8587addf68c +Subproject commit c937c071297b02c58fab86bca8ab4938eed80814 diff --git a/lib/service/discovery.go b/lib/service/discovery.go index 28bd85efc153d..68741f269fc7d 100644 --- a/lib/service/discovery.go +++ b/lib/service/discovery.go @@ -127,6 +127,11 @@ func (process *TeleportProcess) initDiscoveryService() error { } log.Infof("Discovery service has successfully started") + // The Discovery service doesn't have heartbeats so we cannot use them to check health. + // For now, we just mark ourselves ready all the time on startup. + // If we don't, a process only running the Discovery service will never report ready. + process.OnHeartbeat(teleport.ComponentDiscovery)(nil) + if err := discoveryService.Wait(); err != nil { return trace.Wrap(err) }