mounting volumes issue with kubelet wrapper

16 views
Skip to first unread message

vincent.g...@gmail.com

unread,
Jan 13, 2018, 8:44:27 AM1/13/18
to rkt-dev
Hello everybody, I am using the kubelet wrapper on contaner linux and get a strange issue when mounting local volumes. I think its related to rkt (misconfiguration or bug).
My local volumes are in this structure :
/dev/vdb => /mnt/ssd/ssd1
/dev/vdc => /mnt/ssd/ssd2
/dev/vdd => /mnt/hdd/hdd1
/dev/vde => /mnt/hdd/hdd2
...

If I directly mount each volume in the kubelet (i.e. mounting the 4 volumes separately), no issues, local volumes are provisioned and pods using them just write correctly to them (I can see the writings in the host volumes).
But if I just mount /mnt to expose all volumes to the kubelet, it cannot mount correctly the local volumes in pods, I don't get any error, the pod isn't writing to /mnt/ssd/ssd1 but to the following host directories:

/var/lib/rkt/pods/run/19159e51-dfb6-4a2d-a320-0e4b81908cf7/stage1/rootfs/opt/stage2/hyperkube/rootfs/var/lib/kubelet/pods/1226cebc-f863-11e7-9119-02edd950cc13/volumes/kubernetes.io~local-volume/local-pv-4be3e024/test-volume
/var/lib/rkt/pods/run/19159e51-dfb6-4a2d-a320-0e4b81908cf7/stage1/rootfs/opt/stage2/hyperkube/rootfs/mnt/ssd/ssd1/test-volume
/var/lib/kubelet/pods/1226cebc-f863-11e7-9119-02edd950cc13/volumes/kubernetes.io~local-volume/local-pv-4be3e024/test-volume

Connecting to the kubelet I can find the test-volume files there:

/var/lib/kubelet/pods/1226cebc-f863-11e7-9119-02edd950cc13/volumes/kubernetes.io~local-volume/local-pv-4be3e024/test-volume
/mnt/ssd/ssd1/test-volume

But nothing on the host!

Note that the local provisioner doesn't have any problem to recycle the volumes with a delete policy...Whichever configuration I use.

Doesn't someone has any experience running the kubelet in rkt and issues with mounting volumes similar to me ?



Alban Crequy

unread,
Jan 15, 2018, 8:45:16 AM1/15/18
to vincent.g...@gmail.com, rkt-dev
Hi,

I am not sure it would work but could you try with the recursive=true option?
--volume mnt,kind=host,source=/mnt,recursive=true

https://github.com/rkt/rkt/blob/master/Documentation/subcommands/run.md#host-volumes

Cheers,
Alban
Reply all
Reply to author
Forward
0 new messages