podman icon indicating copy to clipboard operation
podman copied to clipboard

Startup healthcheck interval ignored when startup command is omitted

Open mwdle opened this issue 1 week ago • 1 comments

Issue Description

The Podman 6.2.0 release notes state:

When a startup healthcheck interval is specified, but no startup healthcheck command, the standard healthcheck command will be used instead

However, when --health-cmd and --health-startup-interval are provided without --health-startup-cmd, the healthcheck seems to follow the regular healthcheck interval and the startup interval is not used.

Steps to reproduce the issue

  1. Create a container with an explicit startup healthcheck command and a one-second startup interval. After five seconds, the healthcheck has run multiple times:

    podman run --rm -d --name explicit --health-cmd false --health-startup-interval 1s --health-startup-cmd false alpine sleep 30
    sleep 5
    podman inspect explicit --format '{{len .State.Health.Log}}'
    
  2. Create a container with the same healthcheck and startup interval, but omit the startup healthcheck command. After five seconds, the healthcheck has run only once:

    podman run --rm -d --name fallback --health-cmd false --health-startup-interval 1s alpine sleep 30
    sleep 5
    podman inspect fallback --format '{{len .State.Health.Log}}'
    

Describe the results you received

The container with an explicit startup healthcheck command records multiple healthcheck executions.

The container without an explicit startup healthcheck command records only one execution. It does not continue running the healthcheck at the specified one-second startup interval.

Describe the results you expected

Both containers should run the healthcheck at approximately one-second intervals during startup.

According to the Podman 6.2.0 release notes, when a startup healthcheck interval is specified without a startup healthcheck command, Podman should use the standard healthcheck command instead.

podman info output

host:
  arch: amd64
  buildahVersion: 1.46.0
  cdiSpecDirs:
  - /etc/cdi
  - /var/run/cdi
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.2.1-2.fc45.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.2.1, commit: '
  cpuUtilization:
    idlePercent: 97.96
    systemPercent: 0.7
    userPercent: 1.34
  cpus: 16
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: kde
    version: "45"
  eventLogger: journald
  freeLocks: 2048
  hostname: p1
  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: 7.3.4-300.fc45.x86_64
  linkmode: dynamic
  logDriver: journald
  memAvailable: 22354874368
  memFree: 3543093248
  memTotal: 33341689856
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    defaultNetwork: podman
    dns:
      package: aardvark-dns-2.1.0-1.fc45.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 2.1.0
    package: netavark-2.1.0-1.fc45.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 2.1.0
  ociRuntime:
    features: '{"ociVersionMin":"1.0.0","ociVersionMax":"1.1.0+dev","hooks":["prestart","createRuntime","createContainer","startContainer","poststart","poststop"],"mountOptions":["rw","rrw","ro","rro","rdirsync","rdiratime","rnodev","rnorelatime","nodiratime","rnodiratime","dirsync","rnosuid","ratime","diratime","rnoatime","strictatime","rstrictatime","noatime","rnostrictatime","rnomand","nostrictatime","rnoexec","nodev","rmand","norelatime","mand","idmap","atime","nomand","noiversion","rbind","rslave","bind","defaults","rrelatime","rprivate","noexec","rsync","remount","dest-nofollow","silent","dev","rdev","iversion","relatime","rsuid","sync","suid","async","rasync","nosuid","rexec","shared","rshared","src-nofollow","slave","loud","private","exec","tmpcopyup","unbindable","runbindable","copy-symlink"],"linux":{"namespaces":["cgroup","ipc","mount","network","pid","user","uts"],"capabilities":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_DAC_READ_SEARCH","CAP_FOWNER","CAP_FSETID","CAP_KILL","CAP_SETGID","CAP_SETUID","CAP_SETPCAP","CAP_LINUX_IMMUTABLE","CAP_NET_BIND_SERVICE","CAP_NET_BROADCAST","CAP_NET_ADMIN","CAP_NET_RAW","CAP_IPC_LOCK","CAP_IPC_OWNER","CAP_SYS_MODULE","CAP_SYS_RAWIO","CAP_SYS_CHROOT","CAP_SYS_PTRACE","CAP_SYS_PACCT","CAP_SYS_ADMIN","CAP_SYS_BOOT","CAP_SYS_NICE","CAP_SYS_RESOURCE","CAP_SYS_TIME","CAP_SYS_TTY_CONFIG","CAP_MKNOD","CAP_LEASE","CAP_AUDIT_WRITE","CAP_AUDIT_CONTROL","CAP_SETFCAP","CAP_MAC_OVERRIDE","CAP_MAC_ADMIN","CAP_SYSLOG","CAP_WAKE_ALARM","CAP_BLOCK_SUSPEND","CAP_AUDIT_READ","CAP_PERFMON","CAP_BPF","CAP_CHECKPOINT_RESTORE"],"cgroup":{"v1":true,"v2":true,"systemd":true,"systemdUser":true},"seccomp":{"enabled":true,"actions":["SCMP_ACT_ALLOW","SCMP_ACT_ERRNO","SCMP_ACT_KILL","SCMP_ACT_KILL_PROCESS","SCMP_ACT_KILL_THREAD","SCMP_ACT_LOG","SCMP_ACT_NOTIFY","SCMP_ACT_TRACE","SCMP_ACT_TRAP"],"operators":["SCMP_CMP_NE","SCMP_CMP_LT","SCMP_CMP_LE","SCMP_CMP_EQ","SCMP_CMP_GE","SCMP_CMP_GT","SCMP_CMP_MASKED_EQ"]},"apparmor":{"enabled":true},"selinux":{"enabled":true},"mountExtensions":{"idmap":{"enabled":true}},"intelRdt":{"enabled":true},"netDevices":{"enabled":true},"memoryPolicy":{"modes":["MPOL_DEFAULT","MPOL_PREFERRED","MPOL_BIND","MPOL_INTERLEAVE","MPOL_LOCAL","MPOL_PREFERRED_MANY","MPOL_WEIGHTED_INTERLEAVE"],"flags":["MPOL_F_NUMA_BALANCING","MPOL_F_RELATIVE_NODES","MPOL_F_STATIC_NODES"]}},"annotations":{"io.github.seccomp.libseccomp.version":"2.6.1","org.opencontainers.runc.checkpoint.enabled":"true","run.oci.crun.checkpoint.enabled":"true","run.oci.crun.commit":"a84965e1278d08d6c75d5b8a41a3e72a7a11fa5b","run.oci.crun.version":"1.31","run.oci.crun.wasm":"true"},"potentiallyUnsafeConfigAnnotations":["module.wasm.image/variant","io.kubernetes.cri.container-type","run.oci.","org.criu.","krun."]}'
    name: crun
    package: crun-1.31-1.fc45.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.31
      commit: a84965e1278d08d6c75d5b8a41a3e72a7a11fa5b
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +JSON_C
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20261002.gcba3570-1.fc45.x86_64
    version: |
      pasta 0^20261002.gcba3570-1.fc45.x86_64
      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
  rootlessPortForwarder: rootlessport
  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: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  swapFree: 7709503488
  swapTotal: 8589930496
  uptime: 20h 5m 41.00s (Approximately 0.83 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
store:
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev
  graphRoot: /home/mwdle/.local/share/containers/storage
  graphRootAllocated: 997409685504
  graphRootUsed: 510255538176
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 3
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/mwdle/.local/share/containers/storage/volumes
version:
  APIVersion: 6.2.0
  BuildOrigin: Fedora Project
  Built: 1794268800
  BuiltTime: Mon Nov  9 17:00:00 2026
  GitCommit: 055de046937d29450f310fce0fe3071485d8bed9
  GoVersion: go1.27.3-X:nodwarf5
  Os: linux
  OsArch: linux/amd64
  Version: 6.2.0

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

mwdle avatar Nov 21 '26 03:11 mwdle

/assign

izislesar avatar Nov 21 '26 15:11 izislesar