ehough / docker-nfs-server

A lightweight, robust, flexible, and containerized NFS server.
https://hub.docker.com/r/erichough/nfs-server/
GNU General Public License v3.0
672 stars 221 forks source link

Fixed the kernel module assertion to consider builtin modules #4

Closed dalazx closed 6 years ago

dalazx commented 6 years ago

This PR addresses the issue when the nfs and nfsd modules are built into kernel. the docker-machine/minikube VM images have them builtin. lsmod lists only dynamically loaded ones. cat /lib/modules/$(uname -r)/modules.builtin consists of a list of builtin modules, but it is not accessible from a container. instead, /sys/module/* directories are used as indicators of presence of certain builtin modules.

ehough commented 6 years ago

This is great, thank you!

Seems to me like maybe we could ditch lsmod entirely, as the existence of a directory at /sys/module/* seems to be a good indicator for both dynamic and static modules. Thoughts?

In the meantime, I've built a new latest on Docker Hub, so you should be able to pull it down and use it now.

dalazx commented 6 years ago

@ehough thank you! I think the current condition addresses the issue and does not really add significant overhead.