Skip to content

Commit

Permalink
app-admin/kubelet-wrapper: mark kubelet datadir volume as a recursive…
Browse files Browse the repository at this point in the history
… mount

So far `/var/lib/kubelet` was mounted as an implicit non-recursive mount.
This changes the wrapper to an explicit recursive mount.

As shown in kubernetes/kubernetes#38498 (comment),
current non-recursive behavior seems to confuse the kubelet which
is incapable of cleaning up resources for orphaned pods, as the
extisting mountpoints for them are not available inside kubelet
chroot.
With `recursive=true`, those mounts are made available in the
chroot and can be unmounted on the host-side from kubelet chroot
via shared back-propagation.

Fixes coreos/bugs#1831
  • Loading branch information
lucab authored and euank committed May 30, 2017
1 parent bafeb23 commit 2c89d48
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app-admin/kubelet-wrapper/files/kubelet-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ exec ${RKT} ${RKT_GLOBAL_ARGS} \
--volume etc-ssl-certs,kind=host,source=/etc/ssl/certs,readOnly=true \
--volume usr-share-certs,kind=host,source=/usr/share/ca-certificates,readOnly=true \
--volume var-lib-docker,kind=host,source=/var/lib/docker,readOnly=false \
--volume var-lib-kubelet,kind=host,source=/var/lib/kubelet,readOnly=false \
--volume var-lib-kubelet,kind=host,source=/var/lib/kubelet,readOnly=false,recursive=true \
--volume os-release,kind=host,source=/usr/lib/os-release,readOnly=true \
--volume run,kind=host,source=/run,readOnly=false \
--mount volume=etc-kubernetes,target=/etc/kubernetes \
Expand Down

0 comments on commit 2c89d48

Please sign in to comment.