coreos-kubernetes
coreos-kubernetes copied to clipboard
Kubelet-Wrapper does not see mounts below hostmount
Hello,
I'm mounting a host volume into the kubelet rkt container via
--volume srv,kind=host,source=/srv \
--mount volume=srv,target=/srv \
Below /srv
I mount some volumes on the host via systemd units, e.g.
j1900 core # systemctl cat srv-bitbucketPGData.mount
# /etc/systemd/system/srv-bitbucketPGData.mount
[Unit]
Before=local-fs.target
[Mount]
What=/dev/data/lvol2
Where=/srv/bitbucketPGData
Type=xfs
[Install]
WantedBy=local-fs.target
This worked fine up until a reboot, since then the mounts below /srv
are not visible inside the rkt container anymore:
j1900 core # rkt enter c0 /bin/mount|grep /srv/bitbucketPGData
vs
j1900 core # mount|grep /srv/bitbucketPGData
/dev/mapper/data-lvol2 on /srv/bitbucketPGData type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
Neither restarting the node again nor restarting the kubelet has solved the issue. The only workaround I've found so far was to remount the respective mounts after the kubelet was started which IMHO is a terrible "solution" as this means the Kubelet already has started the containers that use those mounts
"Remount" as in umount
, then mount
, not as in mount -o remount