portmap hanging on shutdown

Here’s yet another post about my compute cluster. It’s (obviously) running NFS and that works quite well. Up till now, I would always have trouble with portmap hanging on shutdown/reboot. After spending some time thinking about the problem, looking at the init script and googling, I stumbled upon this Ubuntu bug on portmap.

As noted in the bug, a pmap_dump would hang indefinitely. After taking another look at our nfs-root configuration (in regard to the first comment on the bug), it turns out it’s exactly that. We didn’t setup lo which seems vital for some things.

After adding the lines

to /etc/network/interfaces, portmap stops just fine …