Closed jwillikers closed 2 years ago
The output of podman inspect
on that image does not show a healthcheck. There's a note about one in the comments but no actual healthcheck in the config.
The output of
podman inspect
on that image does not show a healthcheck. There's a note about one in the comments but no actual healthcheck in the config.
I'm checking with the Syncthing project upstream to see if it's an issue with how they build their images. Building locally with --format docker
, the health check works.
Does not seem to be a podman issue. closing.
@rhatdan Please re-open this issue. I've conferred with the Syncthing developer and both of us have a working healthcheck out-of-the-box when using Docker directly. It appears that Podman isn't registering the healthcheck for some reason.
$ 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. Could you ask Syncthing developer how Docker knows to run a Healthcheck? If the image does not have a healthcheck field?
Ok when I pull the image with Docker I see.
"Healthcheck": {
"Test": [
"CMD-SHELL",
"nc -z 127.0.0.1 8384 || exit 1"
],
"Interval": 60000000000,
"Timeout": 10000000000
},
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.
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/7 \
-f Dockerfile.buildx \
${tags[*]}
The layers do have the health check: https://hub.docker.com/layers/syncthing/syncthing/1.18/images/sha256-bc5810f54839d3976ac2558fd0ad4b4e2e9987282764151690c23ae8d415ebb2?context=explore
The healthcheck is definitely in the image on the registry (and once pulled in the local containers storage):
~ $ skopeo inspect --config --raw docker://docker.io/syncthing/syncthing@sha256:8ead1a4b86ba94ca6232d16b6bfe12472faf6921001600ac6b5bfbb93384d8d3 | jq ".config.Healthcheck"
{
"Test": [
"CMD-SHELL",
"nc -z 127.0.0.1 8384 || exit 1"
],
"Interval": 60000000000,
"Timeout": 10000000000
I need to have a closer look at what's going on.
I found the issue. buildkit
is setting the health check in image's config while Docker and Podman set it into the image's container config.
I created a test image and will prepare a PR in containers/common.
The containers/common fix only fixes the inspect, it does not fix Podman to actually use the different location of the health check. Also since podman build and buildah are embedding buildkit features. Should we start to store the healthcheck in the new buildkit location?
Also since podman build and buildah are embedding buildkit features. Should we start to store the healthcheck in the new buildkit location?
Both locations are fine. AFAIK buildah config ...
allows for setting it in both locations.
The containers/common fix only fixes the inspect, it does not fix Podman to actually use the different location of the health check.
Yes, I will do the rest of the plumbing here.
The containers/common fix only fixes the inspect, it does not fix Podman to actually use the different location of the health check.
Actually, it fixes it entirely. Just need to vendor in c/common.
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:
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):
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