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

libimage: inspect: extract healthchecks from configs #822

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

vrothberg
Copy link
Member

@vrothberg vrothberg commented Nov 9, 2021

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]

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 9, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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]>
@vrothberg
Copy link
Member Author

@containers/podman-maintainers PTAL

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 9, 2021

LGTM

@rhatdan
Copy link
Member

rhatdan commented Nov 9, 2021

/lgtm
This is also broken in Podman, which is not noticing the health check in the different location.

@openshift-ci openshift-ci bot added the lgtm label Nov 9, 2021
@openshift-merge-robot openshift-merge-robot merged commit c342e49 into containers:main Nov 9, 2021
@vrothberg vrothberg deleted the healthcheck branch November 9, 2021 13:28
Comment on lines +190 to +191
// NOTE: Health checks may be listed in the container config or
// the config.
Copy link
Contributor

Choose a reason for hiding this comment

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

(This comment is true but not particularly informative on top of what the code already does. “in the ContainerConfig (e.g. Docker and Podman) or the Config (e.g. buildx)” might be more helpful for future readers.

As long as it is captured in this PR, that’s probably good enough.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants