etcd-io / etcd

Distributed reliable key-value store for the most critical data of a distributed system
https://etcd.io
Apache License 2.0
47.61k stars 9.75k forks source link

docker swarm cant start etcd container with healtcheck enabled #11340

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi , I am trying to start a 3 node ETCD cluster in docker SWARM environemnt using stack . when service healtheck is enables, docker fails to start containers . maybe it a typo in Stack yaml or misconfiguration of test command, I dont know.

the health check part looks like this,

healthcheck:
     disable: true
    test: ["CMD-SHELL","/usr/bin/curl", "http://127.0.0.1:2379/health"]
    interval: 10s
    timeout: 10s
    retries: 3
    start_period: 10s

if this is Not the right way to do it, i'd appriciate some guidance.

Avi.

ghost commented 4 years ago

the ' disable: true ' was pasted by mistake to the issue .

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

flavienbwk commented 1 year ago

I got this config working :

    healthcheck:
      test: ["CMD", "curl", "http://127.0.0.1:2379/health"]
      interval: 5s
      timeout: 5s
      retries: 6
      start_period: 5s