现象:
操作系统:centos 7.2 kernel 3.10.0-327.el7.x86_64
mesos:1.3.0
docker:docker-17.06.0-ce
在做mesos验证时,通过marathon下发容器,发现在多个mesos-slave节点上下发容器均以失败告终。
marathon:
mesos:
分析:
#在任意1个mesos节点上查看docker下发容器的信息 [root@mesos-node1 ~]# docker ps -a
#再查看每个下发失败的容器的信息,如id为“36f9211279a1”的容器 [root@mesos-node1 ~]# docker inspect container 36f9211279a1
报错信息:"Error": "oci runtime error: container_linux.go:262: starting container process caused \"process_linux.go:339: container init caused \\\"\\\"\"\n",
原因:
google相关报错,https://github.com/moby/moby/issues/34046 给出了答案:
docker-17.06.0-ce部署在centos7.2( kernel :3.10.0-327.el7.x86_64) 时,针对上述情况有1个bug,下发容器指定内存时(matathon下发容器指定了内存)时会触发此bug。
验证:
#不指定内存 [root@mesos-node1 ~]# docker run -itd --name test1 nginx #指定内存,报错复现 [root@mesos-node1 ~]# docker run -itd --name test2 -m 20m nginx #查看容器状态 [root@mesos-node1 ~]# docker ps -a
解决方案:
github上已给出解决方案:This should be cleared up if you update to the latest patch level (-514). Alternatively we will also be releasing a fix with 17.06.1 (docker/docker-ce#102)