-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nfs server does not respond if access is denied #9
Comments
Dumping the debug info I have collected using rpcdebug for this issue Setup: From a NFS perspective: Problem in brief:
Debug data: *** Client side data *** Client IP: 10.0.0.2 ubuntu@ubuntu:~$ dpkg-query -W nfs ubuntu@ubuntu: ubuntu@ubuntu:~$ uname -a ubuntu@ubuntu:~$ nfsstat --version ubuntu@ubuntu:~$ lsmod| grep nfs ubuntu@ubuntu: ubuntu@ubuntu:/$ sudo rpcdebug -m nfs all ubuntu@ubuntu:/$ sudo dmesg --clear ubuntu@ubuntu:/$ time sudo mount -t nfs -vv -o vers=4 10.254.0.3:/shares/share-8b2d529a-0688-4a51-9641-9ee8d781380c /mnt ubuntu@ubuntu:~$ dmesg -T ubuntu@ubuntu:~$ dmesg *** server side data *** Server IP: 10.254.0.3 Since its a cirros image, it doens't have a pkg manager, so can't really query for pkg versions ! $ nfsstat --version $ uname -a $ ip a $ sudo exportfs (when share access-allow is done in manila) $ sudo exportfs (when share access-deny is done in manila) $ dmesg | grep -i nfs |
I also have the tcpdump data captured at the time of the mount hanging. If needed I can share the tcpdump raw binary data too. It gives the same conclusion that dmesg above gives... the client sends PUTROOTFH and hangs waiting for server to respond to it! |
With all the setup remaining same as above, I tried with 64bit NFS client now ... From a NFS perspective: Debug data for the case where manila access-deny was successfully executed: [root@host-10-0-0-5 ~]# uname -a [root@host-10-0-0-5 ~]# [root@host-10-0-0-5 ~]# lsmod | grep nfs [root@host-10-0-0-5 ~]# rpcdebug -m nfs all [root@host-10-0-0-5 ~]# dmesg --clear [root@host-10-0-0-5 ~]# mount -t nfs -vv -o vers=4 10.254.0.3:/shares/share-2df4b2a5-1bfa-486f-9a92-a7c35422193b /mnt |
I'm wondering if this issue is something specific to do with NFSv4 and/or not having any shares at all. If I had 2 shares and I denied access to one of them, would I experience a timeout or an access denied when trying to access the it? It seems to me that having no shares at all might put the NFS server into a special state where it stops listening. |
If the above is true then the workaround would be to always share at least one directory -- presumably some empty, read-only directory. |
Valeiry had suggested similar and IIRC he himself later posted on IRC after testing with cirros image that have 1 share always present doesn't solve the problem. Per Valeriy, I tested in manila devstack context. As part of create-share I added a export for the share-server serving the same share to its own IP and access-allow adds another entry for that share to the instance IP, then when we do deny-access the instance IP entry is removed from exportfs (share server IP entry remains) and the problem (NFS client hang) did reproduce in this case too. So having 1 entry always doesn't seem to solve the issue. |
@vponomaryov reported:
The text was updated successfully, but these errors were encountered: