Red Hat Bugzilla – Bug 1218045
Similar but unrelated NFS exports block proper mounting of "parent" mount point
Last modified: 2015-11-19 08:00:56 EST
run /autofs/regression/bz1203139-exports-entry-block-parent-mounting for autofs-5.0.7-53.el7, seems good. run it for previous version: :: [ BEGIN ] :: Running 'do_client_test /server/dir1/dir11' :: [ BEGIN ] :: Running 'ls /net/intel-s3e36-01.rhts.eng.nay.redhat.com//server/dir1/dir11' :: [ PASS ] :: Command 'ls /net/intel-s3e36-01.rhts.eng.nay.redhat.com//server/dir1/dir11' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server/dir1/dir11 .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server/dir1/dir11 /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server/dir1/dir11 nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server/dir1/dir11 .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server/dir1 .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server/dir1 /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server/dir1 nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server/dir1 .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server .* nfs.*" /proc/mounts' :: [ FAIL ] :: Command 'grep "/server .* nfs.*" /proc/mounts' (Expected 0, got 1) :: [ PASS ] :: Command 'do_client_test /server/dir1/dir11' (Expected 0, got 0) :: [ BEGIN ] :: Running 'do_client_test /server/dir2/dir22' :: [ BEGIN ] :: Running 'ls /net/intel-s3e36-01.rhts.eng.nay.redhat.com//server/dir2/dir22' :: [ PASS ] :: Command 'ls /net/intel-s3e36-01.rhts.eng.nay.redhat.com//server/dir2/dir22' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server/dir2/dir22 .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server/dir2/dir22 /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server/dir2/dir22 nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server/dir2/dir22 .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server/dir2 .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server/dir2 /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server/dir2 nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server/dir2 .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server .* nfs.*" /proc/mounts' :: [ FAIL ] :: Command 'grep "/server .* nfs.*" /proc/mounts' (Expected 0, got 1) :: [ PASS ] :: Command 'do_client_test /server/dir2/dir22' (Expected 0, got 0) run it for autofs-5.0.7-53.el7: :: [ BEGIN ] :: Running 'do_client_test /server/dir1/dir11' :: [ BEGIN ] :: Running 'ls /net/intel-s3e36-01.rhts.eng.nay.redhat.com//server/dir1/dir11' :: [ PASS ] :: Command 'ls /net/intel-s3e36-01.rhts.eng.nay.redhat.com//server/dir1/dir11' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server/dir1/dir11 .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server/dir1/dir11 /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server/dir1/dir11 nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server/dir1/dir11 .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server/dir1 .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server/dir1 /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server/dir1 nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server/dir1 .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ PASS ] :: Command 'do_client_test /server/dir1/dir11' (Expected 0, got 0) :: [ BEGIN ] :: Running 'do_client_test /server/dir2/dir22' :: [ BEGIN ] :: Running 'ls /net/intel-s3e36-01.rhts.eng.nay.redhat.com//server/dir2/dir22' :: [ PASS ] :: Command 'ls /net/intel-s3e36-01.rhts.eng.nay.redhat.com//server/dir2/dir22' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server/dir2/dir22 .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server/dir2/dir22 /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server/dir2/dir22 nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server/dir2/dir22 .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server/dir2 .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server/dir2 /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server/dir2 nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server/dir2 .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ BEGIN ] :: Running 'grep "/server .* nfs.*" /proc/mounts' intel-s3e36-01.rhts.eng.nay.redhat.com:/server /net/intel-s3e36-01.rhts.eng.nay.redhat.com/server nfs4 rw,nosuid,nodev,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.199,local_lock=none,addr=10.66.86.26 0 0 :: [ PASS ] :: Command 'grep "/server .* nfs.*" /proc/mounts' (Expected 0, got 0) :: [ PASS ] :: Command 'do_client_test /server/dir2/dir22' (Expected 0, got 0) I also run regressions, bugzillas, connectathon, stress test cases for autofs-5.0.7-53, no new issues. so I will change this bug status to be verified.
Tiny issues, please NOTICE: 1.the following change seems not right, but no affect for usage: if (pstart[len] != '/' || strlen(pstart) != len || ^^^^^^^^^^^^^^^^^^^^ this is the new condition added, but if the multi map is like "/a, /a/b, /a/b/c", and for the first time, the ofset will be /a, and in this function, should ignore /a/b and /a/b/c, but with the "strlen(pstart) != len", we can't ignore, only wait for next calling for "cache_get_offset". strncmp(offset, pstart, len 2. if the nfs server is local relative to autofs, the the symbol link will be used, and a dead lock will happen: /a/b will be mounted autofs, and further accessing to /a/b for c will hung. But in my idea, this is the supposed way.
(In reply to XuWang from comment #3) > Tiny issues, please NOTICE: Thanks for the comments. This particular bit of code is complicated so it is likely not quite right. This function isn't meant to get all offsets on each call, it's meant to get all offsets up to a nesting point boundary. This is crux of the "mount as you go" functionality and is what makes it more complicated than I would like. I'll check it out as soon as I get time. All the testing I did worked OK and it appears yours has too so I don't think this is urgent and I have some other high priority work at the moment. > > 1.the following change seems not right, but no affect for usage: > > if (pstart[len] != '/' || > strlen(pstart) != len || > ^^^^^^^^^^^^^^^^^^^^ this is the new condition added, but if the multi > map is like "/a, /a/b, /a/b/c", and for the first time, the ofset will be > /a, and in this function, should ignore /a/b and /a/b/c, but with the > "strlen(pstart) != len", we can't ignore, only wait for next calling for > "cache_get_offset". > > strncmp(offset, pstart, len > > 2. if the nfs server is local relative to autofs, the the symbol link will > be used, and a dead lock will happen: > /a/b will be mounted autofs, and further accessing to /a/b for c will hung. > But in my idea, this is the supposed way.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-2417.html