-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Missing healthcheck defined in image #12226
Comments
The output of |
I'm checking with the Syncthing project upstream to see if it's an issue with how they build their images. Building locally with |
Does not seem to be a podman issue. closing. |
@rhatdan Please re-open this issue. $ docker run -it --rm syncthing/syncthing:1.18.4 $ docker ps | grep syncthing
0627293d6ccf syncthing/syncthing:1.18.4 "/bin/entrypoint.sh …" 40 seconds ago Up 39 seconds (health: starting) 8384/tcp, 21027/udp, 22000/tcp, 22000/udp agitated_kare |
The only reference to the HEALTHCHECK is in History. |
Ok when I pull the image with Docker I see.
Which I don't see in Podman. Is there two images, once OCI and one Docker format? @mtrmac @vrothberg Ideas? |
@rhatdan I've invited the Syncthing developers to respond to your question in this thread. |
It's just a single image, one for each architecture.
The layers do have the health check: |
The healthcheck is definitely in the image on the registry (and once pulled in the local containers storage):
I need to have a closer look at what's going on. |
I found the issue. I created a test image and will prepare a PR in containers/common. |
buildkit is setting the health check in image's config while Docker and Podman set it into the image's container config. Hence, if the container config's healthcheck is nil, have a look at the config. Fixes: #containers/podman/issues/12226 Signed-off-by: Valentin Rothberg <[email protected]>
buildkit is setting the health check in the image's config while Docker and Podman set it in the image's container config. Hence, if the container config's healthcheck is nil, have a look at the config. Fixes: #containers/podman/issues/12226 Signed-off-by: Valentin Rothberg <[email protected]>
buildkit is setting the health check in the image's config while Docker and Podman set it in the image's container config. Hence, if the container config's healthcheck is nil, have a look at the config. Fixes: #containers/podman/issues/12226 Signed-off-by: Valentin Rothberg <[email protected]>
The containers/common fix only fixes the inspect, it does not fix Podman to actually use the different location of the health check. |
Both locations are fine. AFAIK
Yes, I will do the rest of the plumbing here. |
Actually, it fixes it entirely. Just need to vendor in c/common. |
Health checks may be defined in the container config or the config of an image. So far, Podman only looked at the container config. The plumbing happened in libimage but add a regression test to Podman as well to make sure the glue code will not regress. Note that I am pinning github.com/onsi/gomega to v1.16.0 since v1.17.0 requires go 1.16 which in turn is breaking CI. Fixes: containers#12226 Signed-off-by: Valentin Rothberg <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When creating a Syncthing container from the image docker.io/syncthing/syncthing, the included healthcheck is missing.
The Syncthing Dockerfile includes a healtcheck and Docker Hub shows the healtcheck provided by the manifest here.
Steps to reproduce the issue:
$ podman run \ --detach \ --env PGID=(id -g) \ --env PUID=(id -u) \ --env TZ=America/Chicago \ --hostname syncthing \ --label "io.containers.autoupdate=image" \ --name syncthing \ --publish 8384:8384/tcp \ --publish 22000:22000/tcp \ --publish 22000:22000/udp \ --publish 21027:21027/udp \ --rm \ --userns keep-id \ --volume syncthing-config:/var/syncthing/config:Z \ docker.io/syncthing/syncthing:1.18.4
Describe the results you received:
Podman claims that no healthcheck is defined when running a healthcheck on the container.
Describe the results you expected:
I expected Podman to run the healthcheck defined for the image.
Additional information you deem important (e.g. issue happens only occasionally):
$ podman inspect syncthing --format '{{.State.Healthcheck}}' { 0 []}
Syncthing image info from
podman inspect
:Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Fedora IoT - aarch64
Fedora Silverblue - x86_64
The text was updated successfully, but these errors were encountered: