oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.45k stars 5.4k forks source link

compose file changes #2749

Closed saurabhuja closed 5 months ago

saurabhuja commented 5 months ago

I'm also curious about the healthcheck for the various containers in the docker-compose.yml files. To me, the command would only determine if process at some point output a particular log entry, it wouldn't be a valid test to run over and over to determine if that service was still running, which is what a health check is meant to do.

HealthChecks are meant to set dependency between DNS, RAC and CMAN container. If healthcheck of DNS is not passed, RAC will fail. If healthcheck of RAC is not passed, then bringing up CMAN container will fail. To avoid failures and people reporting incorrect issues, I have added healthcheck.

Djelibeybi commented 5 months ago

HealthChecks are meant to set dependency between DNS, RAC and CMAN container.

That's not what a health check is for. It's meant to determine if the service running inside a container is actually running or not. You need to change this so that it's a valid check every time it's run, otherwise it's just going to cause unnecessary load because it's going to run every 30 seconds.

saurabhuja commented 5 months ago

I understand that healtcheck is to check if service is healthy or not. That's what we are checking while setting dependency. See code belo. Otherwise, if customer runs docker-compose up -d, compose will bring up all containers including cman without waiting for racdns and racnode1 to be in healthy condition and whole of setup will fail. I am not able to find any other mechanism in docker compose to set healthy dependency this way. This wont put load for long as there is timeout of retries.

This is discussed & approved by our team for use in Dev environment. If any issue comes, will handle it, customer can always open issues in github repo and we can review later.

I know you are working on extra support, but is it possible to pass this merge rights to someone else, I dont want to put this additional on you when such urgent customer requirements come. FYI @psaini79

depends_on: racdns: condition: service_healthy racnode1: condition: service_healthy

psaini79 commented 5 months ago

@saurabhaahujaa Let us discuss and we need to improve health check based on running services.

@Djelibeybi thanks for your feedback.