projecteru2/agent

agent health checking on dead container

Opened this issue · 1 comments

assume there is a container run in private network binding port 8001, as container dies, container ip address would be empty string, remaining health check TCP net location as something like :8001.

in the case that there's another container running on that node with host network, binding 8001 port as well, health check for the dead one will pass, and core will mark the dead container with status running=false and healthy=true.

oh, 都忘了还有这个 issue, 大概就是说检查一个一个死掉的容器时拼出来的 netloc 是 :8000 这种, 导致 agent 去 net.Dial 这个地址会去连到 localhost:8000, 如果恰好宿主机上有个基础服务绑定了这个端口, 那这个死容器的 healthy 会被设为 true.