Bug 2043073

Summary: Container with `--healthcheck-interval` and `--healthcheck-timeout` options able to restart but with an error with Podman
Product: Red Hat Enterprise Linux 8 Reporter: Sameer <snangare>
Component: podmanAssignee: Paul Holzinger <pholzing>
Status: CLOSED DUPLICATE QA Contact: atomic-bugs <atomic-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.5CC: bbaude, dwalsh, jligon, jnovy, lsm5, mheon, pthomas, tsweeney, umohnani
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-24 18:31:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sameer 2022-01-20 15:17:29 UTC
Description of problem:

A container with `--healthcheck-interval` and `--healthcheck-timeout` options able to restart but with an error.  

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

  RHEL - 8.5
  Podman - 3.3.1

How reproducible:

  100% reproducible

Steps to Reproduce:

1. Run the container with `--healthcheck-interval` and `--healthcheck-timeout` options 

  $ podman run -dit --name test --health-cmd="/bin/foobar" --healthcheck-interval=15s --health-timeout=10s ubi8
4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f

2. Check the files created under /run/systemd/transient/

  $ ls -l /run/systemd/transient/ | grep 4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f
-rw-r--r--. 1 root root 441 Jan 20 10:06 4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f.service
-rw-r--r--. 1 root root 275 Jan 20 10:06 4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f.timer
-rw-r--r--. 1 root root 348 Jan 20 10:06 libpod-4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f.scope
drwxr-xr-x. 2 root root 100 Jan 20 10:06 libpod-4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f.scope.d
-rw-r--r--. 1 root root 164 Jan 20 10:06 libpod-conmon-4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f.scope

3. Restart the container and see it starts but throws an error.

  $ podman restart test
ERRO[0001] Failed to start transient timer unit: Unit 4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f.timer already exists. 
4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f

  $ podman ps | grep test2
4b3b5a710eb9  registry.access.redhat.com/ubi8:latest      /bin/bash             51 seconds ago  Up 17 seconds ago                        test


Actual results:

The container able to restart but with an error.

  $ podman restart test
ERRO[0001] Failed to start transient timer unit: Unit 4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f.timer already exists. 
4b3b5a710eb963708e8ee808604f997ab557b88d25499495061d8c360063b43f

Expected results:

The container should be able to restart cleanly without an error

Additional info:

Comment 1 Tom Sweeney 2022-01-21 00:56:25 UTC
Paul, can you take a look at this please?

Comment 2 Brent Baude 2022-01-24 15:27:10 UTC
no need to, it is a dup ... im looking for the bug number

Comment 3 Brent Baude 2022-01-24 15:30:18 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=2024229  <-- this was reported earlier

Comment 4 Daniel Walsh 2022-01-24 18:31:19 UTC

*** This bug has been marked as a duplicate of bug 2024229 ***