RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2094610 - Healthcheck does not get executed if --interval not specified in Dockerfile
Summary: Healthcheck does not get executed if --interval not specified in Dockerfile
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: Alex Jia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-08 02:03 UTC by mangesh.panche
Modified: 2023-09-18 04:38 UTC (History)
12 users (show)

Fixed In Version: podman-4.2.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 09:15:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github containers podman issues 13912 0 None closed healthcheck never executes when Dockerfile lacks --interval 2022-08-26 11:08:49 UTC
Github containers podman pull 13928 0 None Merged healthcheck: set default healthcheck `Interval` if not specified in image 2022-06-14 23:19:46 UTC
Red Hat Issue Tracker RHELPLAN-124601 0 None None None 2022-06-08 02:14:02 UTC
Red Hat Product Errata RHSA-2022:7457 0 None None None 2022-11-08 09:16:27 UTC

Description mangesh.panche 2022-06-08 02:03:45 UTC
Description of problem:
The container with Dockerfile having --interval not specified, the container remains in 'starting' state.

Version-Release number of selected component (if applicable):
Podman 4.0.2

How reproducible:
Always

Steps to Reproduce:
1. Create a image with Dockerfile that contains HEALTHCHECK field, but not providing the --interval flag
2. Run “podman build” with --format=docker flag
3. Run “podman run” to start the container
4. Run “podman ps”, the STATE will always stuck in “starting”
5. Run “podman inspect <container_id>”, healthcheck field is empty

Actual results:
The container remains in "starting" state

Expected results:
The health check executes at default interval and it shows as "healthy".

Additional info:
The issue was reported in Podman community in this link: https://github.com/containers/podman/issues/13912

And there are two pull requests for this fix and is already merged in the Podman master branch:
https://github.com/openshift/imagebuilder/pull/225/files
https://github.com/containers/podman/pull/13928/files

Comment 1 Tom Sweeney 2022-06-08 14:03:47 UTC
Brent, PTAL

Comment 2 Brent Baude 2022-06-08 15:31:51 UTC
For clarification, in your report you said two pull requests were merged upstream that fixed this.  Does that mean it works upstream but not in the version of RHEL you are using?  Are you really asking for a backport?

Comment 3 mangesh.panche 2022-06-09 16:50:58 UTC
That correct @bbaude 
We want it to be backported to Podman 4.0 on RHEL 8.6.

Comment 5 Brent Baude 2022-06-09 20:06:20 UTC
FWIW, the development team does not make decisions on backports.  It is typically done by product management.  the appropriate people have been asked.

Comment 6 Tom Sweeney 2022-06-10 19:17:19 UTC
@dornelas and @mrussell I think our only delivery vehicle for RHEL 8.6 at this point is 8.6.0.2 and this fix is included in Podman v4.1.1 which will be part of RHEL 8.6.0.2.  I don't think any further backport is necessary, thoughts?  FWIW, RHEL 8.6.0.2 is due out in mid August.

Comment 7 Derrick Ornelas 2022-06-14 23:19:47 UTC
Correct, the next planned release under development will include podman-4.1.1, and this rebase will be made available in the August timeframe.  

My understanding is that the workaround for this issue is to include the '--interval=<duration>' option with the HEALTHCHECK instruction.

Comment 10 Alex Jia 2022-08-29 12:08:05 UTC
This bug has been verified on podman-4.2.0-1.module+el8.7.0+16493+89f82ab8.x86_64.

[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.7 Beta (Ootpa)

[root@hpe-dl380pgen8-02-vm-7 ~]# rpm -q podman runc systemd kernel
podman-4.2.0-1.module+el8.7.0+16493+89f82ab8.x86_64
runc-1.1.4-1.module+el8.7.0+16493+89f82ab8.x86_64
systemd-239-65.el8.x86_64
kernel-4.18.0-422.el8.x86_64

[root@hpe-dl380pgen8-02-vm-7 ~]# podman build . -t dev --format docker
STEP 1/4: FROM quay.io/libpod/alpine
Trying to pull quay.io/libpod/alpine:latest...
Getting image source signatures
Copying blob 9d16cba9fb96 done  
Copying config 9617696764 done  
Writing manifest to image destination
Storing signatures
STEP 2/4: RUN mkdir /healthchecks
--> ce87526f6a7
STEP 3/4: HEALTHCHECK CMD touch /healthchecks/"$(date +%s)"
--> ff1bc3d88ad
STEP 4/4: CMD ["sleep", "999999999999"]
COMMIT dev
--> 0d74bc74495
Successfully tagged localhost/dev:latest
0d74bc74495a485eff48bf44557506d3dd82b0ba3e5f880adc80fef748568271

[root@hpe-dl380pgen8-02-vm-7 ~]# podman run -d --name test --rm dev
f1f7c7f0a80499a2f2d3c9fb380cdd166d7ac37f7607f9bcca1165ee90d0e786
[root@hpe-dl380pgen8-02-vm-7 ~]# podman ps
CONTAINER ID  IMAGE                 COMMAND               CREATED             STATUS                           PORTS       NAMES
f1f7c7f0a804  localhost/dev:latest  sleep 99999999999...  About a minute ago  Up About a minute ago (healthy)              test
[root@hpe-dl380pgen8-02-vm-7 ~]# podman ps
CONTAINER ID  IMAGE                 COMMAND               CREATED             STATUS                           PORTS       NAMES
f1f7c7f0a804  localhost/dev:latest  sleep 99999999999...  About a minute ago  Up About a minute ago (healthy)              test
[root@hpe-dl380pgen8-02-vm-7 ~]# podman ps
CONTAINER ID  IMAGE                 COMMAND               CREATED             STATUS                           PORTS       NAMES
f1f7c7f0a804  localhost/dev:latest  sleep 99999999999...  About a minute ago  Up About a minute ago (healthy)              test
[root@hpe-dl380pgen8-02-vm-7 ~]# podman exec test ls /healthchecks
1661774679
1661774710
1661774741
1661774772

Comment 12 errata-xmlrpc 2022-11-08 09:15:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7457

Comment 13 Red Hat Bugzilla 2023-09-18 04:38:43 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.