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

support podman by treating empty docker health check as healthy #4367

Closed
wants to merge 1 commit into from

Conversation

nougad
Copy link

@nougad nougad commented Jan 14, 2024

Podman will include the Health dict even if no health check is defined for the container (see
containers/podman#20029).

This makes the check in uptime-kuma stuck in Pending

Fixes #3767

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma

Tick the checkbox if you understand [x]:

  • I have read and understand the pull request rules.

Description

Fixes #3767

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods)
  • My changes generates no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.

Podman will include the Health dict even if no health check is defined
for the container (see
containers/podman#20029).

This makes the check in uptime-kuma stuck in Pending

Fixes louislam#3767
@CommanderStorm
Copy link
Collaborator

How does this affect docker?

@CommanderStorm CommanderStorm added the area:monitor Everything related to monitors label Jan 14, 2024
@CommanderStorm CommanderStorm changed the title Treat empty docker Health check as healthy to support podman support podman by treating empty docker health check as healthy Jan 14, 2024
@nougad
Copy link
Author

nougad commented Jan 14, 2024

If a container has no healthcheck defined, docker will return State.Health as an empty dict. If an healthcheck is defined the field State.Health.Status is one of starting, healthy or unhealthy. Both is covered with the existing check.

The patch treats on top of the existing healthy string also an empty string as healthy. It will not affect docker because for docker the Status field should never be empty.

@nougad
Copy link
Author

nougad commented Jan 15, 2024

closing this PR in favor of #4372

@nougad nougad closed this Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:monitor Everything related to monitors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Podman container Pending without healthcheck
2 participants