Message ID | 20200512211640.5826.77139.stgit@klimt.1015granger.net (mailing list archive) |
---|---|
Headers | show |
Series | Possible NFSD patches for v5.8 | expand |
I'm getting a repeatable timeout failure on python 4.0 test WRT15. In pynfs, run: ./nfs4.0/testserver.py server:/export/path --rundeps --maketree WRT15 Looks like it sends WRITE+GETATTR(FATTR4_SIZE) compounds with write offset 0 and write length taking on every value from 0 to 8192. Probably an xdr decoding bug of some kind? I don't see anything in the server logs. --b. On Tue, May 12, 2020 at 05:22:04PM -0400, Chuck Lever wrote: > Available to view: > https://git.linux-nfs.org/?p=cel/cel-2.6.git;a=shortlog;h=refs/heads/nfsd-5.8 > > Pull from: > git://git.linux-nfs.org/projects/cel/cel-2.6.git nfsd-5.8 > > Highlights of this series: > * Remove serialization of sending RPC/RDMA Replies > * Convert the TCP socket send path to use xdr_buf::bvecs (pre-requisite for RPC-on-TLS) > * Fix svcrdma backchannel sendto return code > * Convert a number of dprintk call sites to use tracepoints > * Fix the "suggest braces around empty body in an ‘else’ statement" warning > > Changes since v1: > * Rebased on v5.7-rc5+ > * Re-organized the series so changes interesting to linux-rdma appear together > * Addressed sparse warnings found by the kbuild test robot > * Included an additional minor clean-up: removal of the unused SVCRDMA_DEBUG macro > * Clarified several patch descriptions > > --- > > Chuck Lever (29): > SUNRPC: Move xpt_mutex into socket xpo_sendto methods > svcrdma: Clean up the tracing for rw_ctx_init errors > svcrdma: Clean up handling of get_rw_ctx errors > svcrdma: Trace page overruns when constructing RDMA Reads > svcrdma: trace undersized Write chunks > svcrdma: Fix backchannel return code > svcrdma: Remove backchannel dprintk call sites > svcrdma: Rename tracepoints that record header decoding errors > svcrdma: Remove the SVCRDMA_DEBUG macro > svcrdma: Displayed remote IP address should match stored address > svcrdma: Add tracepoints to report ->xpo_accept failures > SUNRPC: Remove kernel memory address from svc_xprt tracepoints > SUNRPC: Tracepoint to record errors in svc_xpo_create() > SUNRPC: Trace a few more generic svc_xprt events > SUNRPC: Remove "#include <trace/events/skb.h>" > SUNRPC: Add more svcsock tracepoints > SUNRPC: Replace dprintk call sites in TCP state change callouts > SUNRPC: Trace server-side rpcbind registration events > SUNRPC: Rename svc_sock::sk_reclen > SUNRPC: Restructure svc_tcp_recv_record() > SUNRPC: Refactor svc_recvfrom() > SUNRPC: Restructure svc_udp_recvfrom() > SUNRPC: svc_show_status() macro should have enum definitions > NFSD: Add tracepoints to NFSD's duplicate reply cache > NFSD: Add tracepoints to the NFSD state management code > NFSD: Add tracepoints for monitoring NFSD callbacks > SUNRPC: Clean up request deferral tracepoints > NFSD: Squash an annoying compiler warning > NFSD: Fix improperly-formatted Doxygen comments > > > fs/nfsd/nfs4callback.c | 37 +- > fs/nfsd/nfs4proc.c | 7 +- > fs/nfsd/nfs4state.c | 63 ++-- > fs/nfsd/nfscache.c | 57 +-- > fs/nfsd/nfsctl.c | 26 +- > fs/nfsd/state.h | 7 - > fs/nfsd/trace.h | 345 ++++++++++++++++++ > include/linux/sunrpc/svc.h | 1 + > include/linux/sunrpc/svc_rdma.h | 6 +- > include/linux/sunrpc/svcsock.h | 6 +- > include/trace/events/rpcrdma.h | 142 ++++++-- > include/trace/events/sunrpc.h | 387 ++++++++++++++++++-- > net/sunrpc/svc.c | 19 +- > net/sunrpc/svc_xprt.c | 41 +-- > net/sunrpc/svcsock.c | 393 ++++++++++----------- > net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 86 +---- > net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 21 +- > net/sunrpc/xprtrdma/svc_rdma_rw.c | 92 ++--- > net/sunrpc/xprtrdma/svc_rdma_transport.c | 55 ++- > 19 files changed, 1221 insertions(+), 570 deletions(-) > > -- > Chuck Lever
> On May 19, 2020, at 12:11 PM, J. Bruce Fields <bfields@fieldses.org> wrote: > > I'm getting a repeatable timeout failure on python 4.0 test WRT15. In > pynfs, run: > > ./nfs4.0/testserver.py server:/export/path --rundeps --maketree WRT15 > > Looks like it sends WRITE+GETATTR(FATTR4_SIZE) compounds with write > offset 0 and write length taking on every value from 0 to 8192. > > Probably an xdr decoding bug of some kind? My first thought is to bisect, but I don't see a particular change in my v5.8 series that would plausibly introduce this class of problem. > I don't see anything in the server logs. > > --b. > > On Tue, May 12, 2020 at 05:22:04PM -0400, Chuck Lever wrote: >> Available to view: >> https://git.linux-nfs.org/?p=cel/cel-2.6.git;a=shortlog;h=refs/heads/nfsd-5.8 >> >> Pull from: >> git://git.linux-nfs.org/projects/cel/cel-2.6.git nfsd-5.8 >> >> Highlights of this series: >> * Remove serialization of sending RPC/RDMA Replies >> * Convert the TCP socket send path to use xdr_buf::bvecs (pre-requisite for RPC-on-TLS) >> * Fix svcrdma backchannel sendto return code >> * Convert a number of dprintk call sites to use tracepoints >> * Fix the "suggest braces around empty body in an ‘else’ statement" warning >> >> Changes since v1: >> * Rebased on v5.7-rc5+ >> * Re-organized the series so changes interesting to linux-rdma appear together >> * Addressed sparse warnings found by the kbuild test robot >> * Included an additional minor clean-up: removal of the unused SVCRDMA_DEBUG macro >> * Clarified several patch descriptions >> >> --- >> >> Chuck Lever (29): >> SUNRPC: Move xpt_mutex into socket xpo_sendto methods >> svcrdma: Clean up the tracing for rw_ctx_init errors >> svcrdma: Clean up handling of get_rw_ctx errors >> svcrdma: Trace page overruns when constructing RDMA Reads >> svcrdma: trace undersized Write chunks >> svcrdma: Fix backchannel return code >> svcrdma: Remove backchannel dprintk call sites >> svcrdma: Rename tracepoints that record header decoding errors >> svcrdma: Remove the SVCRDMA_DEBUG macro >> svcrdma: Displayed remote IP address should match stored address >> svcrdma: Add tracepoints to report ->xpo_accept failures >> SUNRPC: Remove kernel memory address from svc_xprt tracepoints >> SUNRPC: Tracepoint to record errors in svc_xpo_create() >> SUNRPC: Trace a few more generic svc_xprt events >> SUNRPC: Remove "#include <trace/events/skb.h>" >> SUNRPC: Add more svcsock tracepoints >> SUNRPC: Replace dprintk call sites in TCP state change callouts >> SUNRPC: Trace server-side rpcbind registration events >> SUNRPC: Rename svc_sock::sk_reclen >> SUNRPC: Restructure svc_tcp_recv_record() >> SUNRPC: Refactor svc_recvfrom() >> SUNRPC: Restructure svc_udp_recvfrom() >> SUNRPC: svc_show_status() macro should have enum definitions >> NFSD: Add tracepoints to NFSD's duplicate reply cache >> NFSD: Add tracepoints to the NFSD state management code >> NFSD: Add tracepoints for monitoring NFSD callbacks >> SUNRPC: Clean up request deferral tracepoints >> NFSD: Squash an annoying compiler warning >> NFSD: Fix improperly-formatted Doxygen comments >> >> >> fs/nfsd/nfs4callback.c | 37 +- >> fs/nfsd/nfs4proc.c | 7 +- >> fs/nfsd/nfs4state.c | 63 ++-- >> fs/nfsd/nfscache.c | 57 +-- >> fs/nfsd/nfsctl.c | 26 +- >> fs/nfsd/state.h | 7 - >> fs/nfsd/trace.h | 345 ++++++++++++++++++ >> include/linux/sunrpc/svc.h | 1 + >> include/linux/sunrpc/svc_rdma.h | 6 +- >> include/linux/sunrpc/svcsock.h | 6 +- >> include/trace/events/rpcrdma.h | 142 ++++++-- >> include/trace/events/sunrpc.h | 387 ++++++++++++++++++-- >> net/sunrpc/svc.c | 19 +- >> net/sunrpc/svc_xprt.c | 41 +-- >> net/sunrpc/svcsock.c | 393 ++++++++++----------- >> net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 86 +---- >> net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 21 +- >> net/sunrpc/xprtrdma/svc_rdma_rw.c | 92 ++--- >> net/sunrpc/xprtrdma/svc_rdma_transport.c | 55 ++- >> 19 files changed, 1221 insertions(+), 570 deletions(-) >> >> -- >> Chuck Lever -- Chuck Lever
On Tue, May 19, 2020 at 12:14:22PM -0400, Chuck Lever wrote: > > > > On May 19, 2020, at 12:11 PM, J. Bruce Fields <bfields@fieldses.org> wrote: > > > > I'm getting a repeatable timeout failure on python 4.0 test WRT15. In > > pynfs, run: > > > > ./nfs4.0/testserver.py server:/export/path --rundeps --maketree WRT15 > > > > Looks like it sends WRITE+GETATTR(FATTR4_SIZE) compounds with write > > offset 0 and write length taking on every value from 0 to 8192. > > > > Probably an xdr decoding bug of some kind? > > My first thought is to bisect, but I don't see a particular change in my > v5.8 series that would plausibly introduce this class of problem. It's SUNRPC: Refactor svc_recvfrom(). That was just from a quick automated bisect. I haven't tried to figure out where the bug is.... --b.
Hi Bruce- > On May 19, 2020, at 5:29 PM, Bruce Fields <bfields@fieldses.org> wrote: > > On Tue, May 19, 2020 at 12:14:22PM -0400, Chuck Lever wrote: >> >> >>> On May 19, 2020, at 12:11 PM, J. Bruce Fields <bfields@fieldses.org> wrote: >>> >>> I'm getting a repeatable timeout failure on python 4.0 test WRT15. In >>> pynfs, run: >>> >>> ./nfs4.0/testserver.py server:/export/path --rundeps --maketree WRT15 >>> >>> Looks like it sends WRITE+GETATTR(FATTR4_SIZE) compounds with write >>> offset 0 and write length taking on every value from 0 to 8192. >>> >>> Probably an xdr decoding bug of some kind? >> >> My first thought is to bisect, but I don't see a particular change in my >> v5.8 series that would plausibly introduce this class of problem. > > It's SUNRPC: Refactor svc_recvfrom(). > > That was just from a quick automated bisect. I haven't tried to figure > out where the bug is.... Your reproducer isn't working for me on EL7. [root@manet ~]# yum install krb5-devel python3-devel swig python3-gssapi python3-ply Loaded plugins: ulninfo Package krb5-devel-1.15.1-46.el7.x86_64 already installed and latest version Package python3-devel-3.6.8-13.0.1.el7.x86_64 already installed and latest version Package swig-2.0.10-5.el7.x86_64 already installed and latest version No package python3-gssapi available. No package python3-ply available. Nothing to do [root@manet ~]# logout [cel@manet pynfs]$ ./nfs4.0/testserver.py server:/export/path --rundeps --maketree WRT15 Traceback (most recent call last): File "./nfs4.0/testserver.py", line 388, in <module> main() File "./nfs4.0/testserver.py", line 242, in main opt.machinename = os.fsencode(opt.machinename) AttributeError: 'module' object has no attribute 'fsencode' [cel@manet pynfs]$ -- Chuck Lever
> On May 19, 2020, at 6:25 PM, Chuck Lever <chuck.lever@oracle.com> wrote: > > Hi Bruce- > >> On May 19, 2020, at 5:29 PM, Bruce Fields <bfields@fieldses.org> wrote: >> >> On Tue, May 19, 2020 at 12:14:22PM -0400, Chuck Lever wrote: >>> >>> >>>> On May 19, 2020, at 12:11 PM, J. Bruce Fields <bfields@fieldses.org> wrote: >>>> >>>> I'm getting a repeatable timeout failure on python 4.0 test WRT15. In >>>> pynfs, run: >>>> >>>> ./nfs4.0/testserver.py server:/export/path --rundeps --maketree WRT15 >>>> >>>> Looks like it sends WRITE+GETATTR(FATTR4_SIZE) compounds with write >>>> offset 0 and write length taking on every value from 0 to 8192. >>>> >>>> Probably an xdr decoding bug of some kind? >>> >>> My first thought is to bisect, but I don't see a particular change in my >>> v5.8 series that would plausibly introduce this class of problem. >> >> It's SUNRPC: Refactor svc_recvfrom(). >> >> That was just from a quick automated bisect. I haven't tried to figure >> out where the bug is.... > > Your reproducer isn't working for me on EL7. > > [root@manet ~]# yum install krb5-devel python3-devel swig python3-gssapi python3-ply > Loaded plugins: ulninfo > Package krb5-devel-1.15.1-46.el7.x86_64 already installed and latest version > Package python3-devel-3.6.8-13.0.1.el7.x86_64 already installed and latest version > Package swig-2.0.10-5.el7.x86_64 already installed and latest version > No package python3-gssapi available. > No package python3-ply available. > Nothing to do > [root@manet ~]# logout > [cel@manet pynfs]$ ./nfs4.0/testserver.py server:/export/path --rundeps --maketree WRT15 > Traceback (most recent call last): > File "./nfs4.0/testserver.py", line 388, in <module> > main() > File "./nfs4.0/testserver.py", line 242, in main > opt.machinename = os.fsencode(opt.machinename) > AttributeError: 'module' object has no attribute 'fsencode' > [cel@manet pynfs]$ I've reproduced your original test failure. I can take a closer look tomorrow. Looks like python3 is now a requirement for pynfs, despite the comments and code in nfs4.0/testserver.py. Also, the README should explain that the server under test has to permit access from insecure source ports (this still might not be the default for some NFS servers). -- Chuck Lever
On Tue, May 19, 2020 at 07:32:37PM -0400, Chuck Lever wrote: > Looks like python3 is now a requirement for pynfs, despite the comments > and code in nfs4.0/testserver.py. > > Also, the README should explain that the server under test has to permit > access from insecure source ports (this still might not be the default > for some NFS servers). Both done, thanks for the feedback.--b. commit e4379b69becd Author: J. Bruce Fields <bfields@redhat.com> Date: Wed May 20 12:43:33 2020 -0400 Document high-port requirement for server testing Some NFS servers by default require the client to connect from a low-numbered port. But pynfs is meant to be runnable as a non-root user, and as such can't necessarily get low-numbered ports. It might be useful to at least try to get a low-numbered port, or to give a better error message. For now, at least warn about this in the README. Signed-off-by: J. Bruce Fields <bfields@redhat.com> diff --git a/README b/README index 79cac62cb75e..a0236fb6b209 100644 --- a/README +++ b/README @@ -18,6 +18,10 @@ For more details about 4.0 and 4.1 testing, see nfs4.0/README and nfs4.1/README, respectively. For information about automatic code generation from an XDR file, see xdr/README. +Note that any server under test must permit connections from high port +numbers. (In the case of the NFS server, you can do this by adding +"insecure" to the export options.) + Note that test results should *not* be considered authoritative statements about the protocol--if you find that a server fails a test, you should consult the rfc's and think carefully before assuming that commit 39b62e990d84 Author: J. Bruce Fields <bfields@redhat.com> Date: Tue May 19 22:58:23 2020 -0400 Fix comments and version checks that refer to python 2 The minimum required version may actually be greater than 3.0, I'm not sure. Signed-off-by: J. Bruce Fields <bfields@redhat.com> diff --git a/nfs4.0/lib/rpc/rpc.py b/nfs4.0/lib/rpc/rpc.py index cc509965f8e7..8f5ce26226d3 100644 --- a/nfs4.0/lib/rpc/rpc.py +++ b/nfs4.0/lib/rpc/rpc.py @@ -1,6 +1,6 @@ # rpc.py - based on RFC 1831 # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.0/nfs4client.py b/nfs4.0/nfs4client.py index 5916dcc74139..37fbcbec9132 100755 --- a/nfs4.0/nfs4client.py +++ b/nfs4.0/nfs4client.py @@ -9,8 +9,8 @@ # import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03000000: + print("Requires python 3.0 or higher") sys.exit(1) import os # Allow to be run stright from package root diff --git a/nfs4.0/nfs4lib.py b/nfs4.0/nfs4lib.py index 9adeb81daa95..82cec4b68cee 100644 --- a/nfs4.0/nfs4lib.py +++ b/nfs4.0/nfs4lib.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4lib.py - NFS4 library for Python # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.0/servertests/environment.py b/nfs4.0/servertests/environment.py index e7ef2b052833..edbd37a638a5 100644 --- a/nfs4.0/servertests/environment.py +++ b/nfs4.0/servertests/environment.py @@ -1,7 +1,7 @@ # # environment.py # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.0/testserver.py b/nfs4.0/testserver.py index 4f31f92a1e34..d380f2d5fe83 100755 --- a/nfs4.0/testserver.py +++ b/nfs4.0/testserver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4stest.py - nfsv4 server tester # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for @@ -26,8 +26,8 @@ import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03000000: + print("Requires python 3.0 or higher") sys.exit(1) import os # Allow to be run stright from package root diff --git a/nfs4.1/client41tests/environment.py b/nfs4.1/client41tests/environment.py index 25e7cb08ebb1..26d7368ebcb0 100644 --- a/nfs4.1/client41tests/environment.py +++ b/nfs4.1/client41tests/environment.py @@ -1,7 +1,7 @@ # # environment.py # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py index e7bcaa90904c..b24862b61f08 100644 --- a/nfs4.1/server41tests/environment.py +++ b/nfs4.1/server41tests/environment.py @@ -1,7 +1,7 @@ # # environment.py # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.1/testclient.py b/nfs4.1/testclient.py index 19bd148edde2..3027419babd2 100755 --- a/nfs4.1/testclient.py +++ b/nfs4.1/testclient.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4stest.py - nfsv4 server tester # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for @@ -23,8 +23,8 @@ import use_local # HACK so don't have to rebuild constantly import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03000000: + print("Requires python 3.0 or higher") sys.exit(1) import os diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py index 8c4ccdef5afa..0bf6bfc80fdc 100644 --- a/nfs4.1/testmod.py +++ b/nfs4.1/testmod.py @@ -1,6 +1,6 @@ # testmod.py - run tests from a suite # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.1/testserver.py b/nfs4.1/testserver.py index f3fcfe9b8851..6b1157985be9 100755 --- a/nfs4.1/testserver.py +++ b/nfs4.1/testserver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4stest.py - nfsv4 server tester # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for @@ -27,8 +27,8 @@ import use_local # HACK so don't have to rebuild constantly import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03000000: + print("Requires python 3.0 or higher") sys.exit(1) import os diff --git a/showresults.py b/showresults.py index 0229a1e4d7b6..41d1c851721c 100755 --- a/showresults.py +++ b/showresults.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # showresults.py - redisplay results from nfsv4 server tester output file # -# Requires python 2.7 +# Requires python 3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for
> On May 20, 2020, at 12:46 PM, Bruce Fields <bfields@fieldses.org> wrote: > > On Tue, May 19, 2020 at 07:32:37PM -0400, Chuck Lever wrote: >> Looks like python3 is now a requirement for pynfs, despite the comments >> and code in nfs4.0/testserver.py. >> >> Also, the README should explain that the server under test has to permit >> access from insecure source ports (this still might not be the default >> for some NFS servers). > > Both done, thanks for the feedback.--b. > > commit e4379b69becd > Author: J. Bruce Fields <bfields@redhat.com> > Date: Wed May 20 12:43:33 2020 -0400 > > Document high-port requirement for server testing > > Some NFS servers by default require the client to connect from a > low-numbered port. But pynfs is meant to be runnable as a non-root > user, and as such can't necessarily get low-numbered ports. > > It might be useful to at least try to get a low-numbered port, or to > give a better error message. For now, at least warn about this in the > README. > > Signed-off-by: J. Bruce Fields <bfields@redhat.com> > > diff --git a/README b/README > index 79cac62cb75e..a0236fb6b209 100644 > --- a/README > +++ b/README > @@ -18,6 +18,10 @@ For more details about 4.0 and 4.1 testing, see nfs4.0/README and > nfs4.1/README, respectively. For information about automatic code > generation from an XDR file, see xdr/README. > > +Note that any server under test must permit connections from high port > +numbers. (In the case of the NFS server, you can do this by adding > +"insecure" to the export options.) Thanks! One nit: "In the case of the Linux NFS server" > + > Note that test results should *not* be considered authoritative > statements about the protocol--if you find that a server fails a test, > you should consult the rfc's and think carefully before assuming that > > commit 39b62e990d84 > Author: J. Bruce Fields <bfields@redhat.com> > Date: Tue May 19 22:58:23 2020 -0400 > > Fix comments and version checks that refer to python 2 > > The minimum required version may actually be greater than 3.0, I'm not > sure. > > Signed-off-by: J. Bruce Fields <bfields@redhat.com> > > diff --git a/nfs4.0/lib/rpc/rpc.py b/nfs4.0/lib/rpc/rpc.py > index cc509965f8e7..8f5ce26226d3 100644 > --- a/nfs4.0/lib/rpc/rpc.py > +++ b/nfs4.0/lib/rpc/rpc.py > @@ -1,6 +1,6 @@ > # rpc.py - based on RFC 1831 > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.0/nfs4client.py b/nfs4.0/nfs4client.py > index 5916dcc74139..37fbcbec9132 100755 > --- a/nfs4.0/nfs4client.py > +++ b/nfs4.0/nfs4client.py > @@ -9,8 +9,8 @@ > # > > import sys > -if sys.hexversion < 0x02070000: > - print("Requires python 2.7 or higher") > +if sys.hexversion < 0x03000000: > + print("Requires python 3.0 or higher") > sys.exit(1) > import os > # Allow to be run stright from package root > diff --git a/nfs4.0/nfs4lib.py b/nfs4.0/nfs4lib.py > index 9adeb81daa95..82cec4b68cee 100644 > --- a/nfs4.0/nfs4lib.py > +++ b/nfs4.0/nfs4lib.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # nfs4lib.py - NFS4 library for Python > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.0/servertests/environment.py b/nfs4.0/servertests/environment.py > index e7ef2b052833..edbd37a638a5 100644 > --- a/nfs4.0/servertests/environment.py > +++ b/nfs4.0/servertests/environment.py > @@ -1,7 +1,7 @@ > # > # environment.py > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.0/testserver.py b/nfs4.0/testserver.py > index 4f31f92a1e34..d380f2d5fe83 100755 > --- a/nfs4.0/testserver.py > +++ b/nfs4.0/testserver.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # nfs4stest.py - nfsv4 server tester > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > @@ -26,8 +26,8 @@ > > > import sys > -if sys.hexversion < 0x02070000: > - print("Requires python 2.7 or higher") > +if sys.hexversion < 0x03000000: > + print("Requires python 3.0 or higher") > sys.exit(1) > import os > # Allow to be run stright from package root > diff --git a/nfs4.1/client41tests/environment.py b/nfs4.1/client41tests/environment.py > index 25e7cb08ebb1..26d7368ebcb0 100644 > --- a/nfs4.1/client41tests/environment.py > +++ b/nfs4.1/client41tests/environment.py > @@ -1,7 +1,7 @@ > # > # environment.py > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py > index e7bcaa90904c..b24862b61f08 100644 > --- a/nfs4.1/server41tests/environment.py > +++ b/nfs4.1/server41tests/environment.py > @@ -1,7 +1,7 @@ > # > # environment.py > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.1/testclient.py b/nfs4.1/testclient.py > index 19bd148edde2..3027419babd2 100755 > --- a/nfs4.1/testclient.py > +++ b/nfs4.1/testclient.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # nfs4stest.py - nfsv4 server tester > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > @@ -23,8 +23,8 @@ > > import use_local # HACK so don't have to rebuild constantly > import sys > -if sys.hexversion < 0x02070000: > - print("Requires python 2.7 or higher") > +if sys.hexversion < 0x03000000: > + print("Requires python 3.0 or higher") > sys.exit(1) > import os > > diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py > index 8c4ccdef5afa..0bf6bfc80fdc 100644 > --- a/nfs4.1/testmod.py > +++ b/nfs4.1/testmod.py > @@ -1,6 +1,6 @@ > # testmod.py - run tests from a suite > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.1/testserver.py b/nfs4.1/testserver.py > index f3fcfe9b8851..6b1157985be9 100755 > --- a/nfs4.1/testserver.py > +++ b/nfs4.1/testserver.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # nfs4stest.py - nfsv4 server tester > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > @@ -27,8 +27,8 @@ > > import use_local # HACK so don't have to rebuild constantly > import sys > -if sys.hexversion < 0x02070000: > - print("Requires python 2.7 or higher") > +if sys.hexversion < 0x03000000: > + print("Requires python 3.0 or higher") > sys.exit(1) > import os > > diff --git a/showresults.py b/showresults.py > index 0229a1e4d7b6..41d1c851721c 100755 > --- a/showresults.py > +++ b/showresults.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # showresults.py - redisplay results from nfsv4 server tester output file > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for -- Chuck Lever
hi Bruce, … On 20/05/2020 5:46 pm, Bruce Fields wrote: > On Tue, May 19, 2020 at 07:32:37PM -0400, Chuck Lever wrote: >> Looks like python3 is now a requirement for pynfs, despite the comments >> and code in nfs4.0/testserver.py. >> >> Also, the README should explain that the server under test has to permit >> access from insecure source ports (this still might not be the default >> for some NFS servers). > > Both done, thanks for the feedback.--b. > > commit e4379b69becd > Author: J. Bruce Fields <bfields@redhat.com> > Date: Wed May 20 12:43:33 2020 -0400 > > Document high-port requirement for server testing > > Some NFS servers by default require the client to connect from a > low-numbered port. But pynfs is meant to be runnable as a non-root > user, and as such can't necessarily get low-numbered ports. > > It might be useful to at least try to get a low-numbered port, or to > give a better error message. For now, at least warn about this in the > README. > > Signed-off-by: J. Bruce Fields <bfields@redhat.com> > > diff --git a/README b/README > index 79cac62cb75e..a0236fb6b209 100644 > --- a/README > +++ b/README > @@ -18,6 +18,10 @@ For more details about 4.0 and 4.1 testing, see nfs4.0/README and > nfs4.1/README, respectively. For information about automatic code > generation from an XDR file, see xdr/README. > > +Note that any server under test must permit connections from high port > +numbers. (In the case of the NFS server, you can do this by adding > +"insecure" to the export options.) > + > Note that test results should *not* be considered authoritative > statements about the protocol--if you find that a server fails a test, > you should consult the rfc's and think carefully before assuming that > > commit 39b62e990d84 > Author: J. Bruce Fields <bfields@redhat.com> > Date: Tue May 19 22:58:23 2020 -0400 > > Fix comments and version checks that refer to python 2 > > The minimum required version may actually be greater than 3.0, I'm not > sure. for what it's worth, it requires at least v3.2, since it uses os.fsencode(), which was introduced in that rev. That doesn't contradict your statement, of course, and I've not checked the rest of it. cheers, calum. > > Signed-off-by: J. Bruce Fields <bfields@redhat.com> > > diff --git a/nfs4.0/lib/rpc/rpc.py b/nfs4.0/lib/rpc/rpc.py > index cc509965f8e7..8f5ce26226d3 100644 > --- a/nfs4.0/lib/rpc/rpc.py > +++ b/nfs4.0/lib/rpc/rpc.py > @@ -1,6 +1,6 @@ > # rpc.py - based on RFC 1831 > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.0/nfs4client.py b/nfs4.0/nfs4client.py > index 5916dcc74139..37fbcbec9132 100755 > --- a/nfs4.0/nfs4client.py > +++ b/nfs4.0/nfs4client.py > @@ -9,8 +9,8 @@ > # > > import sys > -if sys.hexversion < 0x02070000: > - print("Requires python 2.7 or higher") > +if sys.hexversion < 0x03000000: > + print("Requires python 3.0 or higher") > sys.exit(1) > import os > # Allow to be run stright from package root > diff --git a/nfs4.0/nfs4lib.py b/nfs4.0/nfs4lib.py > index 9adeb81daa95..82cec4b68cee 100644 > --- a/nfs4.0/nfs4lib.py > +++ b/nfs4.0/nfs4lib.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # nfs4lib.py - NFS4 library for Python > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.0/servertests/environment.py b/nfs4.0/servertests/environment.py > index e7ef2b052833..edbd37a638a5 100644 > --- a/nfs4.0/servertests/environment.py > +++ b/nfs4.0/servertests/environment.py > @@ -1,7 +1,7 @@ > # > # environment.py > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.0/testserver.py b/nfs4.0/testserver.py > index 4f31f92a1e34..d380f2d5fe83 100755 > --- a/nfs4.0/testserver.py > +++ b/nfs4.0/testserver.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # nfs4stest.py - nfsv4 server tester > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > @@ -26,8 +26,8 @@ > > > import sys > -if sys.hexversion < 0x02070000: > - print("Requires python 2.7 or higher") > +if sys.hexversion < 0x03000000: > + print("Requires python 3.0 or higher") > sys.exit(1) > import os > # Allow to be run stright from package root > diff --git a/nfs4.1/client41tests/environment.py b/nfs4.1/client41tests/environment.py > index 25e7cb08ebb1..26d7368ebcb0 100644 > --- a/nfs4.1/client41tests/environment.py > +++ b/nfs4.1/client41tests/environment.py > @@ -1,7 +1,7 @@ > # > # environment.py > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py > index e7bcaa90904c..b24862b61f08 100644 > --- a/nfs4.1/server41tests/environment.py > +++ b/nfs4.1/server41tests/environment.py > @@ -1,7 +1,7 @@ > # > # environment.py > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.1/testclient.py b/nfs4.1/testclient.py > index 19bd148edde2..3027419babd2 100755 > --- a/nfs4.1/testclient.py > +++ b/nfs4.1/testclient.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # nfs4stest.py - nfsv4 server tester > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > @@ -23,8 +23,8 @@ > > import use_local # HACK so don't have to rebuild constantly > import sys > -if sys.hexversion < 0x02070000: > - print("Requires python 2.7 or higher") > +if sys.hexversion < 0x03000000: > + print("Requires python 3.0 or higher") > sys.exit(1) > import os > > diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py > index 8c4ccdef5afa..0bf6bfc80fdc 100644 > --- a/nfs4.1/testmod.py > +++ b/nfs4.1/testmod.py > @@ -1,6 +1,6 @@ > # testmod.py - run tests from a suite > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > diff --git a/nfs4.1/testserver.py b/nfs4.1/testserver.py > index f3fcfe9b8851..6b1157985be9 100755 > --- a/nfs4.1/testserver.py > +++ b/nfs4.1/testserver.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # nfs4stest.py - nfsv4 server tester > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for > @@ -27,8 +27,8 @@ > > import use_local # HACK so don't have to rebuild constantly > import sys > -if sys.hexversion < 0x02070000: > - print("Requires python 2.7 or higher") > +if sys.hexversion < 0x03000000: > + print("Requires python 3.0 or higher") > sys.exit(1) > import os > > diff --git a/showresults.py b/showresults.py > index 0229a1e4d7b6..41d1c851721c 100755 > --- a/showresults.py > +++ b/showresults.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python > # showresults.py - redisplay results from nfsv4 server tester output file > # > -# Requires python 2.7 > +# Requires python 3 > # > # Written by Fred Isaman <iisaman@citi.umich.edu> > # Copyright (C) 2004 University of Michigan, Center for >
On Wed, May 20, 2020 at 12:48:15PM -0400, Chuck Lever wrote: > > On May 20, 2020, at 12:46 PM, Bruce Fields <bfields@fieldses.org> wrote: > > --- a/README > > +++ b/README > > @@ -18,6 +18,10 @@ For more details about 4.0 and 4.1 testing, see nfs4.0/README and > > nfs4.1/README, respectively. For information about automatic code > > generation from an XDR file, see xdr/README. > > > > +Note that any server under test must permit connections from high port > > +numbers. (In the case of the NFS server, you can do this by adding > > +"insecure" to the export options.) > > Thanks! One nit: > > "In the case of the Linux NFS server" Whoops, fixed. Thanks.--b.
On Wed, May 20, 2020 at 06:01:27PM +0100, Calum Mackay wrote: > On 20/05/2020 5:46 pm, Bruce Fields wrote: > > Fix comments and version checks that refer to python 2 > > The minimum required version may actually be greater than 3.0, I'm not > > sure. > > for what it's worth, it requires at least v3.2, since it uses > os.fsencode(), which was introduced in that rev. > > That doesn't contradict your statement, of course, and I've not > checked the rest of it. Thanks! I've updated it to refer to 3.2. --b. commit f7234d07ee81 Author: J. Bruce Fields <bfields@redhat.com> Date: Tue May 19 22:58:23 2020 -0400 Fix comments and version checks that refer to python 2 The minimum required version may actually be greater than 3.2, I'm not sure. I've been testing with 3.8.2. Signed-off-by: J. Bruce Fields <bfields@redhat.com> diff --git a/nfs4.0/lib/rpc/rpc.py b/nfs4.0/lib/rpc/rpc.py index cc509965f8e7..6a13e856f3f0 100644 --- a/nfs4.0/lib/rpc/rpc.py +++ b/nfs4.0/lib/rpc/rpc.py @@ -1,6 +1,6 @@ # rpc.py - based on RFC 1831 # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.0/nfs4client.py b/nfs4.0/nfs4client.py index 5916dcc74139..f67c1e3695d6 100755 --- a/nfs4.0/nfs4client.py +++ b/nfs4.0/nfs4client.py @@ -9,8 +9,8 @@ # import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03020000: + print("Requires python 3.2 or higher") sys.exit(1) import os # Allow to be run stright from package root diff --git a/nfs4.0/nfs4lib.py b/nfs4.0/nfs4lib.py index 9adeb81daa95..a9a65d7a2f10 100644 --- a/nfs4.0/nfs4lib.py +++ b/nfs4.0/nfs4lib.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4lib.py - NFS4 library for Python # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.0/servertests/environment.py b/nfs4.0/servertests/environment.py index e7ef2b052833..fcaa0ebec075 100644 --- a/nfs4.0/servertests/environment.py +++ b/nfs4.0/servertests/environment.py @@ -1,7 +1,7 @@ # # environment.py # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.0/testserver.py b/nfs4.0/testserver.py index 4f31f92a1e34..f28ba1bdb6d0 100755 --- a/nfs4.0/testserver.py +++ b/nfs4.0/testserver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4stest.py - nfsv4 server tester # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for @@ -26,8 +26,8 @@ import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03020000: + print("Requires python 3.2 or higher") sys.exit(1) import os # Allow to be run stright from package root diff --git a/nfs4.1/client41tests/environment.py b/nfs4.1/client41tests/environment.py index 25e7cb08ebb1..f84399b4a533 100644 --- a/nfs4.1/client41tests/environment.py +++ b/nfs4.1/client41tests/environment.py @@ -1,7 +1,7 @@ # # environment.py # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py index e7bcaa90904c..ef4db762ff08 100644 --- a/nfs4.1/server41tests/environment.py +++ b/nfs4.1/server41tests/environment.py @@ -1,7 +1,7 @@ # # environment.py # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.1/testclient.py b/nfs4.1/testclient.py index 19bd148edde2..46b7abc1e0a5 100755 --- a/nfs4.1/testclient.py +++ b/nfs4.1/testclient.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4stest.py - nfsv4 server tester # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for @@ -23,8 +23,8 @@ import use_local # HACK so don't have to rebuild constantly import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03020000: + print("Requires python 3.2 or higher") sys.exit(1) import os diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py index 8c4ccdef5afa..6285758fe74d 100644 --- a/nfs4.1/testmod.py +++ b/nfs4.1/testmod.py @@ -1,6 +1,6 @@ # testmod.py - run tests from a suite # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.1/testserver.py b/nfs4.1/testserver.py index f3fcfe9b8851..0447ccd5da7c 100755 --- a/nfs4.1/testserver.py +++ b/nfs4.1/testserver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4stest.py - nfsv4 server tester # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for @@ -27,8 +27,8 @@ import use_local # HACK so don't have to rebuild constantly import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03020000: + print("Requires python 3.2 or higher") sys.exit(1) import os diff --git a/showresults.py b/showresults.py index 0229a1e4d7b6..a39e1b9f7689 100755 --- a/showresults.py +++ b/showresults.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # showresults.py - redisplay results from nfsv4 server tester output file # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for