Created attachment 202519 [details] Our changes for `quota.c` to work around with NetApp mount point. We meet a quota problem with NetApp after upgraded system from FreeBSD-11.2 to FreeBSD-12.0. The quota command in FreeBSD-12.0 returned nothing on any NetApp mount point which works good in FreeBSD-11.2. So we trace the rpc.rquotad packet with tcpdump, and found that the difference is quota of FreeBSD-11.2 sent request of rquota-v1 and FreeBSD-12.0 sent request of rquota-v2. Then we trace the code of quota which is located in '/usr/src/usr.bin/quota/quota.c' to find is there any way to send only rquota-v1 request or resend rquota-v1 request after failure of rquota-v2 request. We found that quota will try rquota-v1 if the v2 request return "Program Version Mismatch", but NetApp seems have a non-standard behavior that would response "Program Not Registered" and leads quota exit without re-trying v1 request. Link below is the issue of libtirpc on Linux caused by the same non-standard behavior: https://sourceforge.net/p/libtirpc/mailman/message/36337416/ We patch one line code and it works on our environment for temporary. The diff output of our patch is attached in the letter. We wonder if this patch can be merged into FreeBSD-12.0, or is there any solution can force quota to use rquota v1 (add an option for this, maybe?) Because NetApp does not want to fix this behavior since 2008, we want to find some solution from FreeBSD. Regards, Jian-Bo Liao Teaching Assistant MAIL: jbliao@cs.nctu.edu.tw Computer Center, Department of Computer Science, National Chiao Tung University, Taiwan. 1001 University Road, Hsinchu, Taiwan 300, ROC.
The patch seems reasonable but I have no way to test it myself, other than build-testing.
Any updates?
(In reply to Sean Eric Fagan from comment #1) How can we provide the test cases?
This issue also happened on 11.3 SNAPSHOT since 11.3 starting using rquota v2 and not fallback to v1 while service is responding "Program Not Registered".
hrs: ping? Can we squeeze this into 12.1?
A commit references this bug: Author: hrs Date: Sat Sep 21 00:17:40 UTC 2019 New revision: 352567 URL: https://svnweb.freebsd.org/changeset/base/352567 Log: Add a workaround for servers which respond RPC_PROGNOTREGISTERED to a clnt_create() call even when it is actually a program version mismatch. Normally the server is supposed to return RPC_PROGVERSMISMATCH when it supports the specified program but not support the specified version. Some filers return RPC_PROGNOTREGISTERED to RQUOTA v2 calls and FreeBSD does not retry with the old v1 calls. This change fixes this failure scenario. Submitted by: Jian-Bo Liao PR: 236179 Changes: head/usr.bin/quota/quota.c
Sorry for the delay getting back to this PR. The submitted fix has been committed and will be merged to stable branches.
AWESOME!
Thanks! Is it possible to also submit a request to merge to releng/12.1 branch?
A commit references this bug: Author: hrs Date: Sat Sep 21 14:03:41 UTC 2019 New revision: 352575 URL: https://svnweb.freebsd.org/changeset/base/352575 Log: MFC r352567: Add a workaround for servers which respond RPC_PROGNOTREGISTERED to a clnt_create() call even when it is actually a program version mismatch. Normally the server is supposed to return RPC_PROGVERSMISMATCH when it supports the specified program but not support the specified version. Some filers return RPC_PROGNOTREGISTERED to RQUOTA v2 calls and FreeBSD does not retry with the old v1 calls. This change fixes this failure scenario. Submitted by: Jian-Bo Liao PR: 236179 Changes: _U stable/12/ stable/12/usr.bin/quota/quota.c
A commit references this bug: Author: hrs Date: Sat Sep 21 14:06:17 UTC 2019 New revision: 352576 URL: https://svnweb.freebsd.org/changeset/base/352576 Log: MFC r352567: Add a workaround for servers which respond RPC_PROGNOTREGISTERED to a clnt_create() call even when it is actually a program version mismatch. Normally the server is supposed to return RPC_PROGVERSMISMATCH when it supports the specified program but not support the specified version. Some filers return RPC_PROGNOTREGISTERED to RQUOTA v2 calls and FreeBSD does not retry with the old v1 calls. This change fixes this failure scenario. Submitted by: Jian-Bo Liao PR: 236179 Changes: _U stable/11/ stable/11/usr.bin/quota/quota.c
MFC to 11 and 12 has been completed. The merge request for releng/12.1 is waiting for a reply from RE.
How's the status of merging this to releng/12.1?
(In reply to Li-Wen Hsu from comment #13) It's too late for 12.1-RELEASE, we will do an EN for this one.
(In reply to Xin LI from comment #14) EN ticket created as admbug 942.
*** Bug 239552 has been marked as a duplicate of this bug. ***
EN announced at: https://www.freebsd.org/security/advisories/FreeBSD-EN-20:07.quotad.asc