Skip to content

Commit

Permalink
[v16] Mark Discovery service healthy on startup (#43283)
Browse files Browse the repository at this point in the history
* Mark Discovery service healthy on startup

* bump e
  • Loading branch information
hugoShaka authored Jun 21, 2024
1 parent 024a30b commit b64767e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/service/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ func (process *TeleportProcess) initDiscoveryService() error {
}
logger.InfoContext(process.ExitContext(), "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)
}
Expand Down

0 comments on commit b64767e

Please sign in to comment.