gpt4 book ai didi

docker - 将 Marathon Health Check 与命令协议(protocol)和容器一起使用时的奇怪行为

转载 作者:行者123 更新时间:2023-12-02 18:33:10 24 4
gpt4 key购买 nike

我无法弄清楚为什么以下请求不会在 Marathon 中开始健康检查。容器已启动,但状态仍为 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
}
]
}

当我查看 Marathon 的日志时,它基本上只是说健康检查已经开始,但仅此而已:
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 中,作业运行状况是灰色的,这意味着运行状况检查是未知的。

真正奇怪的是,如果我运行相同的工作但没有容器它可以工作。

有任何想法吗 ?

最佳答案

更新:
结果发现命令运行状况检查不适用于 docker executor.... 一位同事为此打开了一个问题:
https://github.com/mesosphere/marathon/issues/2140
我们至少会尽快更新文档。

感谢您发现这一点!

关于docker - 将 Marathon Health Check 与命令协议(protocol)和容器一起使用时的奇怪行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32276226/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com