kubenates (openshift)运行任务时出现can't join IPC of container...non-shareable IPC的错误
今天在运行openshift 的时候,发现pod container 不能运行,报错:can't join IPC of container...non-shareable IPC的错误参考:https://blog.csdn.net/qq_38592816/article/details/103107584解决了,方法如下:1: 查看pod 的信息:[root@test3 ~]#...
今天在运行openshift 的时候,发现pod container 不能运行,报错:can't join IPC of container...non-shareable IPC的错误
参考:https://blog.csdn.net/qq_38592816/article/details/103107584
解决了,方法如下:
1: 查看pod 的信息:
[root@test3 ~]# oc get pod
NAME READY STATUS RESTARTS AGE
hello-openshift-1-3wkg4 0/1 CrashLoopBackOff 46 66d
hello-openshift-1-6ipt1 0/1 RunContainerError 1 20s
2: 看一下具体的报错: oc describe pod hello-openshift-1-6ipt1
11m 11m 1 {kubelet test3} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "hello-openshift" with RunContainerError: "runContainer: Error response from daemon: {\"message\":\"can't join IPC of container cfcb329a38ca0c36c9554dddbfc3a1d7f7f6f1f5158602ebf6ceb202076386d6: non-shareable IPC (hint: use IpcMode:shareable for the donor container)\"}"
3: 解决方案
由于网络上没有找到直接的解决方案,只能自己摸索。
首先,通过搜索docker ipc,在docker run reference中找到了一些蛛丝马迹,初步确认是由于ipc的模式被默认设置为private导致的
通过在docker docs中搜索docker default ipc,在docker 19.03 release note中提到了原因,看来都是版本惹的祸(哭了
daemon: Now use ‘private’ ipc mode by default. moby/moby#35621
1
根据提示,修改/etc/docker/daemon.json(没有的话新建一个),添加如下内容
{
"default-ipc-mode": "shareable"
}
重启docker
systemctl restart docker
4: 最后看一下pod的状态:
[root@test3 docker]# oc get pod
NAME READY STATUS RESTARTS AGE
hello-openshift-1-3wkg4 1/1 Running 49 66d
hello-openshift-1-6ipt1 1/1 Running 5 12m
更多推荐
所有评论(0)