xetys / hetzner-kube

A CLI tool for provisioning kubernetes clusters on Hetzner Cloud
Apache License 2.0
746 stars 116 forks source link

Disable updatedb #186

Open voron opened 6 years ago

voron commented 6 years ago

I just hit a problem with updatedb on k8s nodes. It stucks inside mounted external disks such as rbd and prevent them to unmount and thus migrate. Here is lsof tail

lsof: no pwd entry for UID 1000
updatedb.  743930                     root  cwd       DIR              251,0      4096         12 /var/lib/kubelet/plugins/kubernetes.io/rbd/mounts/kube-image-kubernetes-dynamic-pvc-3c72e7ac-aece-11e8-b160-0a580af40542/alertmanager-db
updatedb.  743930                     root   16r      DIR              251,0      4096          2 /var/lib/kubelet/plugins/kubernetes.io/rbd/mounts/kube-image-kubernetes-dynamic-pvc-3c72e7ac-aece-11e8-b160-0a580af40542
updatedb.  743930                     root   17r      DIR              251,0      4096         12 /var/lib/kubelet/plugins/kubernetes.io/rbd/mounts/kube-image-kubernetes-dynamic-pvc-3c72e7ac-aece-11e8-b160-0a580af40542/alertmanager-db

Here is processlist

root@test1-worker-07 ~ # ps uax|grep updatedb
root      743929  0.0  0.0  10252   788 ?        S    Sep05   0:00 flock --nonblock /run/mlocate.daily.lock /usr/bin/ionice -c3 /usr/bin/updatedb.mlocate
root      743930  0.0  0.0   6108  2244 ?        D    Sep05   0:00 /usr/bin/updatedb.mlocate
root     1770527  0.0  0.0  12944   932 pts/0    S+   22:02   0:00 grep --color=auto updatedb

It would be nice to have mlocate/updatedb disabled during node provisioning

voron commented 6 years ago

IMHO it would be great to have an ability to specify custom post-install script to run on all servers. This may provide required flexibility and simplicity.