Open vpetersson opened 2 years ago
Need to add one for diagnostics too presumably?
Already added that.
Already added that.
But it's not being checked anywhere? Need to add that to the docker compose for miner and config containers
Needs to be like:
depends_on:
dbus-session:
condition: service_healthy
diagnostics:
condition: service_healthy
You are correct. We need to add this condition too. I assumed that was implicit, but it wasn't.
I think service_started
is the default https://docs.docker.com/compose/compose-file/compose-file-v2/#depends_on
From balena support:
Victor, I'm afraid this will not work even after (any level of) support for 2.4 is added. Our Supervisors currently only understand the service_started kind of depends_on (ie. not service_healthy). We do have plans to ultimately extend support for several newer properties and features of Docker Compose but it's a complex that just hasn't been prioritised yet.
Can you briefly describe the use case you have for depending on service_healthy? We may be able to suggest workarounds for the short/mid term.
@vpetersson ahh that is annoying...did they have any possible workarounds?
The current workaround is essentially what we're doing (i.e. a checker in the init script). I've requested here if the new changes will also include the service_healthy
state.
I attempted to add a health check for dbus-session in https://github.com/NebraLtd/helium-miner-software/pull/174. However, since we are currently using docker-compose version 2, this will not work. To implement this health check properly, we need to upgrade to 2.4. There is as pull request for this below, so let's just wait until this has been sorted out.
The health check would look something like this:
We might need to tweak these values a bit.
The task includes:
References