1

How to specify a healthcheck for a sidekiq worker inside a docker spawned by mesos?

it has no listening tcp endpoint to query

from marathon api docs i have a possibility of using

 {
            "protocol": "COMMAND",
            "command": { "value": "curl -f -X GET http://$HOST:$PORT0/health" },
            "maxConsecutiveFailures": 3
        }

but I don't see it working in this case...

jny
  • 8,007
  • 3
  • 37
  • 56
  • What versions of Mesos / Marathon are you using? – Connor Doyle Mar 26 '15 at 15:06
  • mesos 0.21.1-1.1.ubuntu1404 mesosphere 0.1.1~ubuntu14.04-1 marathon 0.8.1-1.0.171.ubuntu1404 I try to stick to the latest available. – strzelecki.maciek Mar 27 '15 at 10:25
  • btw, how is mesos checking if the task specified by "cmd" and "docker image" is still alive and running. Is it running some basic psgrep inside periodically? If this is the case, then the healthcheck itself is not required. If the command dies due to some reason, it will be respawned in a new container (or at least this is my wishful thinking ;)) – strzelecki.maciek Mar 27 '15 at 10:30

1 Answers1

2

Clarification: When a command dies for whatever reason, the docker container is stopped and re-spawned.