All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: David Wysochanski <dwysocha@redhat.com>, schumaker.anna@gmail.com
Cc: linux-nfs <linux-nfs@vger.kernel.org>,
	Anna Schumaker <Anna.Schumaker@netapp.com>
Subject: Re: [PATCH v7 1/9] rpcctl: Add a rpcctl.py tool
Date: Wed, 2 Feb 2022 10:33:16 -0500	[thread overview]
Message-ID: <0b953bc7-9f50-e23b-9802-c5552b149ce8@redhat.com> (raw)
In-Reply-To: <CALF+zOmodpOP4HqNZykYQVCcr+i11r6bNSWpGViAnfJzVwHsbw@mail.gmail.com>

Hey Dave!

On 2/1/22 10:57, David Wysochanski wrote:
> On Thu, Jan 27, 2022 at 2:50 PM <schumaker.anna@gmail.com> wrote:
> 
> Might want to rework some of the directory related code to ensure you
> handle disappearing entries.  Got Tracebacks (see below) while running
> a series of tests that would:
> - mount
> - run some IO
> - umount
I guess I'm curious what your exception is...

Shouldn't rpcctl fail after a umount or is your
concern about how the command is failing?

steved.
> 
> 
> [root@dwysocha-fedora-node1 nfs-utils]# while true; do
> ./tools/rpcctl/rpcctl.py xprt; done | grep -B 5 -A 5 Traceback
> Traceback (most recent call last):
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 230, in <module>
>      args.func(args)
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 112, in list_all
>      xprts = [ Xprt(f) for f in (sunrpc / "xprt-switches").glob("**/xprt-*") ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 112, in <listcomp>
>      xprts = [ Xprt(f) for f in (sunrpc / "xprt-switches").glob("**/xprt-*") ]
>    File "/usr/lib64/python3.10/pathlib.py", line 1032, in glob
>      for p in selector.select_from(self):
>    File "/usr/lib64/python3.10/pathlib.py", line 492, in _select_from
>      for starting_point in self._iterate_directories(parent_path,
> is_dir, scandir):
>    File "/usr/lib64/python3.10/pathlib.py", line 482, in _iterate_directories
>      for p in self._iterate_directories(path, is_dir, scandir):
>    File "/usr/lib64/python3.10/pathlib.py", line 471, in _iterate_directories
>      with scandir(parent_path) as scandir_it:
> FileNotFoundError: [Errno 2] No such file or directory:
> '/sys/kernel/sunrpc/xprt-switches/switch-4'
> Traceback (most recent call last):
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 230, in <module>
>      args.func(args)
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 112, in list_all
>      xprts = [ Xprt(f) for f in (sunrpc / "xprt-switches").glob("**/xprt-*") ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 112, in <listcomp>
>      xprts = [ Xprt(f) for f in (sunrpc / "xprt-switches").glob("**/xprt-*") ]
>    File "/usr/lib64/python3.10/pathlib.py", line 1032, in glob
>      for p in selector.select_from(self):
>    File "/usr/lib64/python3.10/pathlib.py", line 492, in _select_from
>      for starting_point in self._iterate_directories(parent_path,
> is_dir, scandir):
>    File "/usr/lib64/python3.10/pathlib.py", line 482, in _iterate_directories
>      for p in self._iterate_directories(path, is_dir, scandir):
>    File "/usr/lib64/python3.10/pathlib.py", line 471, in _iterate_directories
>      with scandir(parent_path) as scandir_it:
> FileNotFoundError: [Errno 2] No such file or directory:
> '/sys/kernel/sunrpc/xprt-switches/switch-2'
> 
> 
> 
> 
> [root@dwysocha-fedora-node1 nfs-utils]# while true; do
> ./tools/rpcctl/rpcctl.py client; done | grep -B 10 -A 10 Traceback
> Traceback (most recent call last):
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 230, in <module>
>      args.func(args)
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in list_all
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in <listcomp>
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 195, in __init__
>      self.switch = XprtSwitch(path / (path / "switch").readlink(), sep=",")
>    File "/usr/lib64/python3.10/pathlib.py", line 1159, in readlink
>      path = self._accessor.readlink(self)
> FileNotFoundError: [Errno 2] No such file or directory:
> '/sys/kernel/sunrpc/rpc-clients/clnt-3/switch'
> Traceback (most recent call last):
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 230, in <module>
>      args.func(args)
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in list_all
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in <listcomp>
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 195, in __init__
>      self.switch = XprtSwitch(path / (path / "switch").readlink(), sep=",")
>    File "/usr/lib64/python3.10/pathlib.py", line 1159, in readlink
>      path = self._accessor.readlink(self)
> FileNotFoundError: [Errno 2] No such file or directory:
> '/sys/kernel/sunrpc/rpc-clients/clnt-7/switch'
> Traceback (most recent call last):
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 230, in <module>
>      args.func(args)
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in list_all
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in <listcomp>
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 195, in __init__
>      self.switch = XprtSwitch(path / (path / "switch").readlink(), sep=",")
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 148, in __init__
>      self.xprts = [ Xprt(p) for p in self.path.iterdir() if p.is_dir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 148, in <listcomp>
>      self.xprts = [ Xprt(p) for p in self.path.iterdir() if p.is_dir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 49, in __init__
>      self.read_state()
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 81, in read_state
>      self.state = ','.join(f.readline().split()[1:])
> OSError: [Errno 19] No such device
> Traceback (most recent call last):
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 230, in <module>
>      args.func(args)
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in list_all
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in <listcomp>
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 195, in __init__
>      self.switch = XprtSwitch(path / (path / "switch").readlink(), sep=",")
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 148, in __init__
>      self.xprts = [ Xprt(p) for p in self.path.iterdir() if p.is_dir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 148, in <listcomp>
>      self.xprts = [ Xprt(p) for p in self.path.iterdir() if p.is_dir() ]
>    File "/usr/lib64/python3.10/pathlib.py", line 1015, in iterdir
>      for name in self._accessor.listdir(self):
> FileNotFoundError: [Errno 2] No such file or directory:
> '/sys/kernel/sunrpc/rpc-clients/clnt-9/../../xprt-switches/switch-2'
> Traceback (most recent call last):
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 230, in <module>
>      args.func(args)
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in list_all
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 209, in <listcomp>
>      clients = [ RpcClient(f) for f in (sunrpc / "rpc-clients").iterdir() ]
>    File "/mnt/build/nfs-utils/./tools/rpcctl/rpcctl.py", line 195, in __init__
>      self.switch = XprtSwitch(path / (path / "switch").readlink(), sep=",")
>    File "/usr/lib64/python3.10/pathlib.py", line 1159, in readlink
>      path = self._accessor.readlink(self)
> FileNotFoundError: [Errno 2] No such file or directory:
> '/sys/kernel/sunrpc/rpc-clients/clnt-5/switch'
> ^C
> 


  reply	other threads:[~2022-02-02 15:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 19:49 [PATCH v7 0/9] Add a tool for using the new sysfs files schumaker.anna
2022-01-27 19:49 ` [PATCH v7 1/9] rpcctl: Add a rpcctl.py tool schumaker.anna
2022-02-01 15:57   ` David Wysochanski
2022-02-02 15:33     ` Steve Dickson [this message]
2022-01-27 19:49 ` [PATCH v7 2/9] rpcctl: Add a command for printing xprt switch information schumaker.anna
2022-01-27 19:49 ` [PATCH v7 3/9] rpcctl: Add a command for printing individual xprts schumaker.anna
2022-01-27 19:49 ` [PATCH v7 4/9] rpcctl: Add a command for printing rpc client information schumaker.anna
2022-01-27 19:49 ` [PATCH v7 5/9] rpcctl: Add a command for changing xprt dstaddr schumaker.anna
2022-01-27 19:49 ` [PATCH v7 6/9] rpcctl: Add a command for changing xprt switch dstaddrs schumaker.anna
2022-01-27 19:49 ` [PATCH v7 7/9] rpcctl: Add a command for changing xprt state schumaker.anna
2022-01-27 19:49 ` [PATCH v7 8/9] rpcctl: Add a man page schumaker.anna
2022-02-07 19:58   ` Steve Dickson
2022-02-07 20:32     ` Anna Schumaker
2022-01-27 19:49 ` [PATCH v7 9/9] rpcctl: Add installation to the Makefile schumaker.anna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b953bc7-9f50-e23b-9802-c5552b149ce8@redhat.com \
    --to=steved@redhat.com \
    --cc=Anna.Schumaker@netapp.com \
    --cc=dwysocha@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=schumaker.anna@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.