Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: healthcheck not waiting for all services to start #1419

Closed
wants to merge 1 commit into from

Conversation

tarunrajput
Copy link
Contributor

fix daytona healthcheck not waiting for all services to start

Description

This PR updates the Daytona health check to ensure all services are ready before the command exits.

  • This change requires a documentation update
  • I have made corresponding changes to the documentation

Related Issue(s)

closes #1357

@tarunrajput tarunrajput requested a review from a team as a code owner December 5, 2024 09:51
@tarunrajput
Copy link
Contributor Author

@quest-bot loot #1357

Copy link

quest-bot bot commented Dec 5, 2024

Quest PR submitted! image Quest PR submitted!

@tarunrajput, you are attempting to solve the issue and loot this Quest. Will you be successful?


Questions? Check out the docs.

@mojafa
Copy link
Collaborator

mojafa commented Dec 5, 2024

On it!

@mojafa
Copy link
Collaborator

mojafa commented Dec 6, 2024

@tarunrajput there's something wrong with the project, I'm having trouble running dtn serve on this PR. It's "hanging". See below.

Screenshot 2024-12-05 at 15 55 44

@tarunrajput
Copy link
Contributor Author

tarunrajput commented Dec 6, 2024

@mojafa, could you pls check now?

Screen.Recording.2024-12-06.at.3.42.46.PM.1.mov

@mojafa
Copy link
Collaborator

mojafa commented Dec 6, 2024

On it now!

Copy link
Member

@Tpuljak Tpuljak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-10 at 09 10 06

I get this error on every run.

func HealthCheck(ctx *gin.Context) {
cfg, err := server.GetConfig()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the direction you were going for here but, because all of these components are separated, we shouldn't mix them together here.

The headscale port and local builder registry port can be checked in the server command directly instead of the API here.

Furthermore, the local builder registry might not even be active (because the user disabled it) so you need to take that into account.

@@ -13,6 +13,8 @@ import (
log "github.com/sirupsen/logrus"
)

var AllProviderRegistered = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this, I suggest that the provider manager has an IsInitialized function that will return true if it is initialized.

Then you can expose an endpoint in the provider controller that will return the "health" of the providers

@tarunrajput
Copy link
Contributor Author

Hi @Tpuljak, I am having a tough time with my mental health right now and don't think I'll be able to complete this. therefore, I am closing this PR.

@Tpuljak
Copy link
Member

Tpuljak commented Dec 13, 2024

Hi @Tpuljak, I am having a tough time with my mental health right now and don't think I'll be able to complete this. therefore, I am closing this PR.

@tarunrajput I am very sorry to hear that. Everyone from the Daytona team wishes you the best. Mental health should be everyone's top priority.
You are always welcome as a contributor to Daytona ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚔️ Quest Tracks quest-bot quests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Daytona server start health check doesn't wait for everything to start
3 participants