Healthchecks with rootless podman fail to be created with the error "service not found" on Red Hat Enteprise Linux 8.2 and earlier.

Solution In Progress - Updated -

Issue

  • Running rootless podman on Red Hat Enterprise Linux 8.2 or earlier, when a container with a healthcheck is enabled, the healthcheck is never created and a "service not found" message appears.
  • As an example, the following command makes a basic container with a healthcheck, but the healthcheck errors upon creation:
$ podman --log-level=debug run -d --name healthcheck-test --health-cmd="/bin/sh -c 'echo hello'" --healthcheck-interval=30s --health-timeout=10s ubi8
- - - - 8< - - - -
DEBU[0000] Received: 111750                             
INFO[0000] Got Conmon PID as 111739                     
DEBU[0000] Created container 54866c61dafaa28ce372465e03f6f9162940252adfa8132c6eed92866c44834c in OCI runtime 
DEBU[0000] creating systemd-transient files: systemd-run [--user --unit 54866c61dafaa28ce372465e03f6f9162940252adfa8132c6eed92866c44834c --on-unit-inactive=30s --timer-property=AccuracySec=1s /usr/bin/podman healthcheck run 54866c61dafaa28ce372465e03f6f9162940252adfa8132c6eed92866c44834c] 
ERRO[0000] exit status 1                                
DEBU[0000] Starting container 54866c61dafaa28ce372465e03f6f9162940252adfa8132c6eed92866c44834c with command [/bin/bash] 
DEBU[0000] Started container 54866c61dafaa28ce372465e03f6f9162940252adfa8132c6eed92866c44834c 
ERRO[0000] Unit 54866c61dafaa28ce372465e03f6f9162940252adfa8132c6eed92866c44834c.service not found. 
54866c61dafaa28ce372465e03f6f9162940252adfa8132c6eed92866c44834c
  • Note the Unit XXXX.service not found. message, which is indicative of this issue.
  • Note that podman commands with the root user are not affected by this.

Environment

  • Red Hat Enterprise Linux 8.2 or lower

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content