我不明白为什么下面的请求不能在马拉松中开始健康检查。容器已启动,但状态保持不变 Deploying
```
{
"id": "bridged-webapp",
"cmd": "python3 -m http.server 8080",
"cpus": 0.1,
"mem": 64.0,
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "python:3",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 8080,
"hostPort": 31313,
"servicePort": 9000,
"protocol": "tcp"
}
]
}
},
"healthChecks": [
{
"protocol": "COMMAND",
"command": { "value": "echo 0" },
"maxConsecutiveFailures": 3
}
]
}
当我看马拉松比赛的记录时,它基本上只是说健康检查已经开始了,但仅此而已:
Aug 28 16:52:33 cnode2 marathon[11495]: [2015-08-28 16:52:33,603] INFO Adding health check for app [/bridged-webapp] and version [2015-08-28T16:52:33.500Z]: [HealthCheck(Some(/),COMMAND,0,Some(Command(echo 0)),300 seconds,60 seconds,20 seconds,3,false)] (mesosphere.marathon.health.MarathonHealthCheckManager$$EnhancerByGuice$$d8828133:76)
Aug 28 16:52:33 cnode2 marathon[11495]: [INFO] [08/28/2015 16:52:33.604] [marathon-akka.actor.default-dispatcher-693] [akka://marathon/user/$kg] Starting health check actor for app [/bridged-webapp] and healthCheck [HealthCheck(Some(/),COMMAND,0,Some(Command(echo 0)),300 seconds,60 seconds,20 seconds,3,false)]
Aug 28 16:52:33 cnode2 marathon[11495]: [INFO] [08/28/2015 16:52:33.627] [marathon-akka.actor.default-dispatcher-694] [akka://marathon/user/MarathonScheduler/$a/DeploymentManager/4f3a1a8e-8934-441a-9c55-b7cf332893e2/$a] Successfully started 0 instances of /bridged-webapp
Aug 28 16:52:37 cnode2 marathon[11495]: [2015-08-28 16:52:37,080] INFO Received status update for task bridged-webapp.2f4399a5-4da5-11e5-b538-080027bb2503: TASK_RUNNING () (mesosphere.marathon.MarathonScheduler$$EnhancerByGuice$$b7a64e04:100)
在ui中,作业运行状况为灰色,表示运行状况检查未知。
真正奇怪的是,如果我运行相同的作业,但没有容器,它就可以工作。
有什么想法吗?
2条答案
按热度按时间qf9go6mv1#
更新:原来命令运行状况检查对docker执行器不起作用。。。。一位同事已经为此打开了一个问题:https://github.com/mesosphere/marathon/issues/2140 我们至少会尽快更新文件。
谢谢你发现这个!
guykilcj2#
看起来在mesos 0.27.0中行为发生了变化。现在
COMMAND
在docker容器内执行。我在任何地方都没看到记录。