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

Fails to handle the service_healthy condition of a depends_on element #866

Open
candleindark opened this issue Mar 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@candleindark
Copy link

Describe the bug
podman-compose fails to handle the service_healthy condition of a depends_on element.

To Reproduce
Steps to reproduce the behavior:

  1. Create the following docker-compose.yml file
services:
  base:
    image: docker.io/debian
    command: [ "tail", "-f", "/dev/null" ]
    healthcheck:
      test: [ "CMD", "false" ]
      interval: 30s
      timeout: 30s
      retries: 3
      start_period: 1m

  dependent:
    image: docker.io/debian
    depends_on:
      base:
        condition: service_healthy
    command: [ "tail", "-f", "/dev/null" ]
  1. Run podman-compose -f docker-compose.yml up -d in the containing directory

Expected behavior
The container corresponding to the dependent service never starts since the base can never be healthy.

Actual behavior
The container corresponding to the dependent service always starts.

Output

podman-compose version
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.3.1
podman-compose version 1.0.6
podman --version 
podman version 4.3.1
exit code: 0

Environment:

  • OS: Debian GNU/Linux 12 (bookworm)
  • podman version: 4.3.1
  • podman compose version: 1.0.6
@pfeileon
Copy link

Could be a duplicate, as the correct implementation of healthchecks is actually a 5-year-old issue: #23

@flixman
Copy link

flixman commented Oct 7, 2024

I am hitting now the same bug: I have a container that is supposed to start when 4 previous containers are up and healthy, and instead it starts right away :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants