Skip to content

Commit 7efaec5

Browse files
author
Ian Campbell
committed
Workaround rootfsPropagation: shared brokenness.
Despite using `rootfsPropagation` after updating to Kubernetes v1.10 (not done here yet) we are seeing: RunContainerError: failed to start container 4ea4bde9b43a9eb241a5d7d98abf87184938f85ce9139949a3a246b6fe6b8985": Error response from daemon: linux mounts: path /etc/kubernetes/pki/etcd is mounted on /etc/kubernetes but it is not a shared or slave mount Workaround this by temporarily (re)doing it in the entrypoint. Signed-off-by: Ian Campbell <[email protected]>
1 parent 218bd59 commit 7efaec5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pkg/cri-containerd/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@ RUN make DESTDIR=/out install
4747

4848
FROM scratch
4949
WORKDIR /
50-
ENTRYPOINT ["cri-containerd", "-v", "2", "--alsologtostderr", "--network-bin-dir", "/opt/cni/bin", "--network-conf-dir", "/etc/cni/net.d"]
50+
# `rootfsPropagation: shared` (used in `build.yml`) appears to be broken at the moment, workaround that issue here.
51+
#ENTRYPOINT ["cri-containerd", "-v", "2", "--alsologtostderr", "--network-bin-dir", "/opt/cni/bin", "--network-conf-dir", "/etc/cni/net.d"]
52+
ENTRYPOINT ["/bin/sh", "-c", "set -ex; mount --make-shared / && exec cri-containerd -v 2 --alsologtostderr --network-bin-dir /opt/cni/bin --network-conf-dir /etc/cni/net.d"]
5153
COPY --from=build /out /

yml/docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ services:
2121
- /var/lib/cni/bin:/opt/cni/bin:rshared,rbind
2222
- /var/lib/kubelet-plugins:/usr/libexec/kubernetes/kubelet-plugins:rshared,rbind
2323
rootfsPropagation: shared
24-
command: ["/usr/local/bin/docker-init", "/usr/local/bin/dockerd"]
24+
# `rootfsPropagation: shared` appears to be broken, workaround that issue here.
25+
#command: ["/usr/local/bin/docker-init", "/usr/local/bin/dockerd"]
26+
command: ["/bin/sh", "-c", "set -ex; mount --make-shared / && exec /usr/local/bin/docker-init /usr/local/bin/dockerd"]
2527
runtime:
2628
mkdir: ["/var/lib/kubeadm", "/var/lib/cni/conf", "/var/lib/cni/bin", "/var/lib/kubelet-plugins"]
2729
cgroupsPath: podruntime/docker

0 commit comments

Comments
 (0)