Skip to content

Healthchecks not working when running Podman without systemd #28192

@mammo0

Description

@mammo0

Issue Description

Hello,

I noticed if you run Podman inside Podman, the healthcheck of an inner container is not executed. The container stays always in starting state. This can be a problem in connection with podman wait.

Please see the linked PR and this comment for detailed information: containers/podman-compose#1356 (comment)

Steps to reproduce the issue

Steps to reproduce the issue

  1. Checkout https://github.com/mammo0/podman-compose/tree/feat_up_start--wait
  2. Enter the repository root directory (cd podman-compose)
  3. Start Podman in Podman (the Podman installation on the host system is rootless)
    podman run --privileged --cgroupns=host -it --rm -v $(pwd):/data quay.io/containers/podman:latest
  4. Inside the container execute the following commands:
    a. cd /data
    b. podman build -t podman-compose-wait-test tests/integration/wait/
    c. podman run -d --rm --health-cmd '["CMD-SHELL", "test -f /healthy"]' --health-interval=1s --health-retries=5 podman-compose-wait-test
  5. Watch the container health status

Describe the results you received

The health status of the container podman-compose-wait-test is always starting. It does not change to healthy (or unhealthy). It seems that the healthcheck command is not executed.

Describe the results you expected

If I execute the above steps 4b and 4c directly with the Podman installation on my host system, the healthcheck works. After about 10 seconds the status of the podman-compose-wait-test container changes to healthy.

podman info output

Output on my host system:

host:
  arch: amd64
  buildahVersion: 1.43.0
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-1:2.2.1-1
    path: /usr/bin/conmon
    version: 'conmon version 2.2.1, commit: c8cc2c4db27531bd4e084ce7857f73cd21ee639d'
  cpuUtilization:
    idlePercent: 95.1
    systemPercent: 1.6
    userPercent: 3.3
  cpus: 12
  databaseBackend: sqlite
  distribution:
    distribution: arch
    version: unknown
  emulatedArchitectures:
  - linux/arm
  - linux/arm64
  - linux/arm64be
  - linux/loong64
  - linux/mips
  - linux/mips64
  - linux/ppc
  - linux/ppc64
  - linux/ppc64le
  - linux/riscv32
  - linux/riscv64
  - linux/s390x
  eventLogger: journald
  freeLocks: 2035
  hostname: ***
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
  kernel: 6.18.13-arch1-1
  linkmode: dynamic
  logDriver: journald
  memFree: 421113856
  memTotal: 16313401344
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    defaultNetwork: podman
    dns:
      package: aardvark-dns-1.17.0-1
      path: /usr/lib/podman/aardvark-dns
      version: aardvark-dns 1.17.0
    package: netavark-1.17.2-1
    path: /usr/lib/podman/netavark
    version: netavark 1.17.2
  ociRuntime:
    name: crun
    package: crun-1.26-3
    path: /usr/bin/crun
    version: |-
      crun version 1.26
      commit: 3241e671f92c33b0c003cd7de319e4f32add6231
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-2026_01_20.386b5f5-1
    version: |
      pasta 2026_01_20.386b5f5
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 6209130496
  swapTotal: 8156344320
  uptime: 1h 37m 36.00s (Approximately 0.04 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /home/***/.config/containers/storage.conf
  containerStore:
    number: 5
    paused: 0
    running: 0
    stopped: 5
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/***/.local/share/containers/storage
  graphRootAllocated: 578730340352
  graphRootUsed: 398056878080
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 31
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/***/.local/share/containers/storage/volumes
version:
  APIVersion: 5.8.0
  Built: 1771796750
  BuiltTime: Sun Feb 22 22:45:50 2026
  GitCommit: 07efc23e05c3d9aa15a0f30d57194737bfc4b6b1
  GoVersion: go1.26.0-X:nodwarf5
  Os: linux
  OsArch: linux/amd64
  Version: 5.8.0

Podman in a container

Yes

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.triagedIssue has been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions