Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Healthcheck values don't default to the same as docker #11225

Closed
WhyNotHugo opened this issue Aug 13, 2021 · 0 comments · Fixed by #11228
Closed

Healthcheck values don't default to the same as docker #11225

WhyNotHugo opened this issue Aug 13, 2021 · 0 comments · Fixed by #11228
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@WhyNotHugo
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

When spawning containers, it seems podman does not default to the same values as docker, so creation fails.

A concrete example:

services:
  postgres:
    image: postgis/postgis:13-3.1-alpine
    environment:
      POSTGRES_PASSWORD: password
    healthcheck:
      test: ["CMD", "pg_isready", "--username", "postgres"]

Running docker-compose up works with docker, but with podman fails:

$ docker-compose up
Creating network "tmp_default" with the default driver
Creating tmp_postgres_1 ... error

ERROR: for tmp_postgres_1  Cannot create container for service postgres: fill out specgen: healthcheck-retries must be greater than 0

ERROR: for postgres  Cannot create container for service postgres: fill out specgen: healthcheck-retries must be greater than 0
ERROR: Encountered errors while bringing up the project.

Docker has these defaults for these values:

interval=30s
timeout=30s
start-period=0s
retries=3

But apparently podman defaults to zero on all of them, so the same as above fails.

Steps to reproduce the issue:

  1. Copy the above yaml.
  2. Run docker-compose up

I suppose this can also be reproduced using the HTTP API, or the cli drop-in wrapper.

Describe the results you received:

$ docker-compose up
Creating network "tmp_default" with the default driver
Creating tmp_postgres_1 ... error

ERROR: for tmp_postgres_1  Cannot create container for service postgres: fill out specgen: healthcheck-retries must be greater than 0

ERROR: for postgres  Cannot create container for service postgres: fill out specgen: healthcheck-retries must be greater than 0
ERROR: Encountered errors while bringing up the project.

Describe the results you expected:

pod should start fine.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

podman version 3.2.3

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.21.3
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: /usr/bin/conmon is owned by conmon 1:2.0.29-1
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: 7e6de6678f6ed8a18661e1d5721b81ccee293b9b'
  cpus: 8
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  hostname: victory
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65537
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65537
  kernel: 5.13.9-arch1-1
  linkmode: dynamic
  memFree: 1964183552
  memTotal: 16465022976
  ociRuntime:
    name: crun
    package: /usr/bin/crun is owned by crun 0.21-1
    path: /usr/bin/crun
    version: |-
      crun version 0.21
      commit: c4c3cdf2ce408ed44a9e027c618473e6485c635b
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  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: /usr/bin/slirp4netns
    package: /usr/bin/slirp4netns is owned by slirp4netns 1.1.12-1
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.1
  swapFree: 34340667392
  swapTotal: 34343288832
  uptime: 22h 19m 31.94s (Approximately 0.92 days)
registries:
  search:
  - docker.io
store:
  configFile: /home/hugo/.config/containers/storage.conf
  containerStore:
    number: 30
    paused: 0
    running: 0
    stopped: 30
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/hugo/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 72
  runRoot: /run/user/1000/containers
  volumePath: /home/hugo/.local/share/containers/storage/volumes
version:
  APIVersion: 3.2.3
  Built: 1628285759
  BuiltTime: Fri Aug  6 23:35:59 2021
  GitCommit: 1e6fd46e91b21342f9454cf8105a92b90e398c52
  GoVersion: go1.16.7
  OsArch: linux/amd64
  Version: 3.2.3

Package info (e.g. output of rpm -q podman or apt list podman):

$ pacman -Qi podman
Name            : podman
Version         : 3.2.3-1
Description     : Tool and library for running OCI-based containers in pods
Architecture    : x86_64
URL             : https://github.com/containers/libpod
Licenses        : Apache
Groups          : None
Provides        : None
Depends On      : cni-plugins  conmon  containers-common  device-mapper  iptables  libseccomp  crun  slirp4netns  libsystemd  fuse-overlayfs  libgpgme.so=11-64
Optional Deps   : podman-docker: for Docker-compatible CLI
                  btrfs-progs: support btrfs backend devices [installed]
                  catatonit: --init flag support
                  crun: support for unified cgroupsv2 [installed]
Required By     : toolbox  whynothugo-desktop
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 72.39 MiB
Packager        : Morten Linderud <[email protected]>
Build Date      : 2021-08-06T23:35:59 CEST
Install Date    : 2021-08-07T15:07:04 CEST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

Yes (latest stable release, not latest master).

Additional environment details (AWS, VirtualBox, physical, etc.):

Laptop.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 13, 2021
mlegenovic added a commit to mlegenovic/podman that referenced this issue Aug 14, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant