Skip to content

Commit

Permalink
[v15] Mark Discovery service healthy on startup (#43284)
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 20, 2024
1 parent 8c22af9 commit fbe3186
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion e
Submodule e updated from 0a2d6b to 30672c
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 fbe3186

Please sign in to comment.