-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 for Portainer Agents Running on Docker Swarm #8578
Comments
Thank you for the information. I am going to further investigate. I will update you as I learn more. Thanks! |
I want to follow up on this. Portainer Agent requires Docker DNS to be working. Docker DNS will not resolve until the healthcheck is successful. I am going to further review with Product. I will update you as I learn more. Thanks! |
same issue here, thanks :) |
This issue has been marked as stale as it has not had recent activity, it will be closed if no further activity occurs in the next 7 days. If you believe that it has been incorrectly labelled as stale, leave a comment and the label will be removed. |
Since no further activity has appeared on this issue it will be closed. If you believe that it has been incorrectly closed, leave a comment mentioning |
Hello-
I am attempting to get a healthcheck running on my portainer agents that are running on swarm nodes. I have successfully deployed an agent with a healthcheck on a Docker Swarm cluster of a single node using the following stack file:
What was critical in getting the above healthcheck to work was setting the
AGENT_CLUSTER_ADDR
tolocalhost
, otherwise I get the following error:But this solution does not work once you have a Swarm cluster larger than one node.
Basically this is all to do with Docker will not resolve DNS in a container until a healthcheck (if defined) passes. This means if your service requires talking to other services outside the container itself (i.e. Portainer Agents talking to each other) before it can be running and considered healthy, you have a chicken and egg problem. You can read more about this long standing issue at moby/moby#35451.
My question is does anyone have a solution for deploying a healthcheck for Portainer Agent across multiple nodes in Docker Swarm?
The text was updated successfully, but these errors were encountered: