On 04.06.2012 08:13, Jamie Heilman wrote: > Michael Tokarev wrote: >> Overall, the code quality is very very low, I'm not sure >> it is possible to maintain this package without very >> serious work with upstream first. > > I took a stab at a slightly less annoying workaround, and found that > with 5.0.6-2 using a map of "jamie -fstype=nfs4 canarsie:/home/jamie" > worked too. Reviewing the code, I'm actually kinda surprised it > worked, but the more I try to follow the logic, the more fragile > everything seems to get.
I had a discussion with upstream about this. It looks like the code works correctly when specifying -fstype=nfs4 OR specifying -port=2049. In either case automount does not try to contact the portmapper, and works instantly. On the other hand, -vers=4 does NOT work, because automount only checks for -fstype and -port, but not -vers. This is a defect in autofs, but it is a small defect. I think it can be made to work with -vers=4 too the same way it works with -fstype=nfs4, that should be easy. Meanwhile, the trivial workaround is to specify -fstype=nfs4 and/or -port, instead of using -vers. Not obvious, that's for sure, but it works and it is simple. I didn't try setting NFSv4 to be the default, or didn't even checked if such an option exist. For the indirect map, ie, /net, a supplied script uses showmount -e, and showmount does not work without portmapper on the remote side. This can be addressed, but it is quite a bit more work, and it will still fail if the server isn't nfsv4-capable. As for the fragile logic - well, it looks a bit fragile, and "twisted" (or convoluted), but the logic itself appears to be right. > It would appear that what I should be doing if > nfs_mount_uses_string_options is true, is setting MOUNT_WAIT to > something other than -1 to reproduce the old behavior I was getting. > (Also, the MOUNT_WAIT description in /etc/default/autofs is slightly > wrong, it mentions umount(8) but that should probably be mount(8).) Yes, the description is wrong. And yes, this MOUNT_WAIT thing makes the logic even more fragile/twisted/convoluted. > I'll test that later, and either run this under a debugger or > instrument it a little to be sure I understand what's going on, but I > think the way automount is handling NFSv4 capability probing is pretty > iffy at the moment. I suspect specifying an explicit port= option > should be taken into account (I'm not doing that currently but I > really should be, and it's entirely arguable that my previous > configuration should have failed becuase I wasn't setting the port > explicitly). Either using -port OR -fstype=nfv4 should work. Please verify if it works for you. Specifying -port= is a bit ugly to my taste, but -fstype=nfs4 is as good as -vers=4. Thank you for patience, /mjt -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org