-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Treat unhealthy docker container as down #4372
base: 1.23.X
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Thank you @vfosnar for merging my commit. The change looks good to me. I'm surprised I completely missed that bug when I made my change. 🙈 My only suggestion would be to make
That way any unknown input would result in DOWN instead of showing it as UP. But that's just a suggestion and not a blocker. |
We may also need to increment retries in case it's stuck in starting. |
This should (don't count on that) be okay because if you have a healthcheck defined the daemon will respond with "unhealthy" |
I haven't tested this, I'm just wondering if you set a container to automatically restart, but it keeps failing, would it be shown as always "starting" |
nvm you're right, it will get stuck even with a healthcheck |
But I'm not sure if simply incrementing retries every time is the best way to handle this. We should respect the start period in which we won't increment them. No idea how to get data on that from the daemon tho. I propose we get this pr merged and start a seperate issue. |
or nah, I will just add the counting, better false positive than false negative |
I think the best way to handle this is to treat the monitor as DOWN if the container is in the "starting" state, as it basically is down for the end user. This PR is ready to be reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested the changes, but they seem way cleaner than the code before. 👍🏻
Could you rebase the changes onto the 1.23.X
-branch instead?
This would reduce our effort involved in making this part of v1.23.12
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Frank Elsinga <[email protected]>
Making I take Uptime Kuma's Docker image as an example: Line 85 in 36196f6
I set the starting period to 180s to make sure the server is fully started, in order to avoid "bootloop". |
Yeah but even if it's starting it is not responding to user's request and that's in my opinion something we should care and notify about |
As it is changing the behaviour of this monitor type, I think it won't be merged into 1.23.X. And I think it needs an alternative method to deal the issue. Making Maybe Uptime Kuma should also add something like |
The problem still exists in current versions (even in the 2.0 beta). Is there a plan to fix this problem? |
Description
Fixes #4369
Type of change
Please delete any options that are not relevant.
or
Checklist