2022-02-09 18:14:34

by Rahul Rathore

[permalink] [raw]
Subject: Re: Testing Results - Add a tool for using the new sysfs files - rpcctl

Hello Anna,

I am yet to do more tests.

However, I will share what I have done till now.

I have upgraded to 5.16.5-200.fc35.x86_64 and some of the problems have
disappeared.

However, some still exist.

1- I am still unable to run xprt commands.

[root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
--id 3 --offline
[Errno 22] Invalid argument
[root@rrathore-upstream-sysfs nfs-utils]#
[root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
--id 3 192.168.122.29 --offline
usage: rpcctl.py [-h] {client,switch,xprt} ...
rpcctl.py: error: unrecognized arguments: 192.168.122.29
[root@rrathore-upstream-sysfs nfs-utils]#
[root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
--id 3 --dstaddr 192.168.122.29 --offline
[Errno 22] Invalid argument
[root@rrathore-upstream-sysfs nfs-utils]#
[root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
--id 3 192.168.122.127 --offline
usage: rpcctl.py [-h] {client,switch,xprt} ...
rpcctl.py: error: unrecognized arguments: 192.168.122.127
[root@rrathore-upstream-sysfs nfs-utils]#
[root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
--id 1 --dstaddr 192.168.122.29 --offline
[Errno 95] Operation not supported
[root@rrathore-upstream-sysfs nfs-utils]#

If I am doing something wrong, kindly provide some examples.

2- However, the switch command worked.

[root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py switch
set --id 2 --dstaddr 192.168.122.30
switch 2: xprts 1, active 1, queue 1
xprt 3: tcp, 192.168.122.30
[root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py switch
switch 0: xprts 1, active 1, queue 0
xprt 0: local, /var/run/rpcbind.sock [main]
switch 1: xprts 1, active 1, queue 0
xprt 1: local, /var/run/gssproxy.sock [main]
switch 2: xprts 1, active 1, queue 1
xprt 3: tcp, 192.168.122.30

Now I see:-
[root@rrathore-upstream-sysfs nfs-utils]# ss | grep -i nfs
tcp SYN-SENT 0 1 192.168.122.125:883
192.168.122.30:nfs

This is picking correct info:-

cat /sys/kernel/debug/sunrpc/rpc_clnt/*/xprt/info
addr: 192.168.122.30
port: 2049
state: 0x15
netid: tcp
addr: 192.168.122.30
port: 2049
state: 0x15


I am not sure of the motive of this command. Is the motive to set IP of NFS
Server to set/change from Client.

Though the current O/P and all is correct. But in this manner NFS will
suffer. cd / ls or any other operation over nfs will hang like below:-

[root@rrathore-upstream-sysfs nfs-utils]# df -h

^C

If the motive was to set NFS Server IP, then it fails to do so as my NFS
Server IP is still an old one and not 192.168.122.30.


Just a suggestion, if you can post some examples in your man page it will
be great.


I am still performing some tests. Will keep you posted.

Regards,
Rahul



2022-02-11 12:41:52

by Rahul Rathore

[permalink] [raw]
Subject: Re: Testing Results - Add a tool for using the new sysfs files - rpcctl

Hello Anna,

Hope you are well.

Yes , now making the NIC down doesn't show any call traces.

However, I am adding to Yesterday's mail.

When my NFS Server IP is 192.168.122.127, it allowed to change switch
to 192.168.122.30. However, nfs connection then was in syn_sent and
nfs was not responding.

Now, if I set my IP back to 192.168.122.127, the command simply hangs.
I am attaching the last 10 lines of strace.
# strace -T -tt -f -v -s 4096 -o /tmp/out.txt ./tools/rpcctl/rpcctl.py
switch set --id 2 --dstaddr 192.168.122.127


18937 11:28:58.225547 close(3) = 0 <0.000010>
18937 11:28:58.225608 mprotect(0x7f7c83128000, 4096, PROT_READ) = 0 <0.000015>
18937 11:28:58.225993 brk(0x55d7df53d000) = 0x55d7df53d000 <0.000029>
18937 11:28:58.227163 openat(AT_FDCWD,
"/sys/kernel/sunrpc/xprt-switches/switch-2/xprt-3-tcp/dstaddr",
O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 3 <0.000030>
18937 11:28:58.227241 newfstatat(3, "", {st_dev=makedev(0, 0x17),
st_ino=25021, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0,
st_blksize=4096, st_blocks=0, st_size=4096, st_atime=1644251948 /*
2022-02-07T11:39:08.446981173-0500 */, st_atime_nsec=446981173,
st_mtime=1644510538 /* 2022-02-10T11:28:58.225300241-0500 */,
st_mtime_nsec=225300241, st_ctime=1644510538 /*
2022-02-10T11:28:58.225300241-0500 */, st_ctime_nsec=225300241},
AT_EMPTY_PATH) = 0 <0.000013>
18937 11:28:58.227349 ioctl(3, TCGETS, 0x7ffe44427570) = -1 ENOTTY
(Inappropriate ioctl for device) <0.000016>
18937 11:28:58.227407 lseek(3, 0, SEEK_CUR) = 0 <0.000010>
18937 11:28:58.227449 ioctl(3, TCGETS, 0x7ffe44427390) = -1 ENOTTY
(Inappropriate ioctl for device) <0.000010>
18937 11:28:58.227503 lseek(3, 0, SEEK_CUR) = 0 <0.000010>
18937 11:28:58.227551 write(3, "192.168.122.127",
15[root@rrathore-upstream-sysfs ~]#
[root@rrathore-upstream-sysfs ~]#
[root@rrathore-upstream-sysfs ~]# tail /tmp/out.txt
18937 11:28:58.225547 close(3) = 0 <0.000010>
18937 11:28:58.225608 mprotect(0x7f7c83128000, 4096, PROT_READ) = 0 <0.000015>
18937 11:28:58.225993 brk(0x55d7df53d000) = 0x55d7df53d000 <0.000029>
18937 11:28:58.227163 openat(AT_FDCWD,
"/sys/kernel/sunrpc/xprt-switches/switch-2/xprt-3-tcp/dstaddr",
O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 3 <0.000030>
18937 11:28:58.227241 newfstatat(3, "", {st_dev=makedev(0, 0x17),
st_ino=25021, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0,
st_blksize=4096, st_blocks=0, st_size=4096, st_atime=1644251948 /*
2022-02-07T11:39:08.446981173-0500 */, st_atime_nsec=446981173,
st_mtime=1644510538 /* 2022-02-10T11:28:58.225300241-0500 */,
st_mtime_nsec=225300241, st_ctime=1644510538 /*
2022-02-10T11:28:58.225300241-0500 */, st_ctime_nsec=225300241},
AT_EMPTY_PATH) = 0 <0.000013>
18937 11:28:58.227349 ioctl(3, TCGETS, 0x7ffe44427570) = -1 ENOTTY
(Inappropriate ioctl for device) <0.000016>
18937 11:28:58.227407 lseek(3, 0, SEEK_CUR) = 0 <0.000010>
18937 11:28:58.227449 ioctl(3, TCGETS, 0x7ffe44427390) = -1 ENOTTY
(Inappropriate ioctl for device) <0.000010>
18937 11:28:58.227503 lseek(3, 0, SEEK_CUR) = 0 <0.000010>
18937 11:28:58.227551 write(3, "192.168.122.127", 15


So in the new Kernel I see issues with xprt set which I sent yesterday
and IP doesn't set to previous for switch which I explained above.

Regards,
Rahul


On Wed, Feb 9, 2022 at 10:50 PM Rahul Rathore <[email protected]> wrote:
>
> Hello Anna,
>
> I am yet to do more tests.
>
> However, I will share what I have done till now.
>
> I have upgraded to 5.16.5-200.fc35.x86_64 and some of the problems have
> disappeared.
>
> However, some still exist.
>
> 1- I am still unable to run xprt commands.
>
> [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
> --id 3 --offline
> [Errno 22] Invalid argument
> [root@rrathore-upstream-sysfs nfs-utils]#
> [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
> --id 3 192.168.122.29 --offline
> usage: rpcctl.py [-h] {client,switch,xprt} ...
> rpcctl.py: error: unrecognized arguments: 192.168.122.29
> [root@rrathore-upstream-sysfs nfs-utils]#
> [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
> --id 3 --dstaddr 192.168.122.29 --offline
> [Errno 22] Invalid argument
> [root@rrathore-upstream-sysfs nfs-utils]#
> [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
> --id 3 192.168.122.127 --offline
> usage: rpcctl.py [-h] {client,switch,xprt} ...
> rpcctl.py: error: unrecognized arguments: 192.168.122.127
> [root@rrathore-upstream-sysfs nfs-utils]#
> [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set
> --id 1 --dstaddr 192.168.122.29 --offline
> [Errno 95] Operation not supported
> [root@rrathore-upstream-sysfs nfs-utils]#
>
> If I am doing something wrong, kindly provide some examples.
>
> 2- However, the switch command worked.
>
> [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py switch
> set --id 2 --dstaddr 192.168.122.30
> switch 2: xprts 1, active 1, queue 1
> xprt 3: tcp, 192.168.122.30
> [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py switch
> switch 0: xprts 1, active 1, queue 0
> xprt 0: local, /var/run/rpcbind.sock [main]
> switch 1: xprts 1, active 1, queue 0
> xprt 1: local, /var/run/gssproxy.sock [main]
> switch 2: xprts 1, active 1, queue 1
> xprt 3: tcp, 192.168.122.30
>
> Now I see:-
> [root@rrathore-upstream-sysfs nfs-utils]# ss | grep -i nfs
> tcp SYN-SENT 0 1 192.168.122.125:883
> 192.168.122.30:nfs
>
> This is picking correct info:-
>
> cat /sys/kernel/debug/sunrpc/rpc_clnt/*/xprt/info
> addr: 192.168.122.30
> port: 2049
> state: 0x15
> netid: tcp
> addr: 192.168.122.30
> port: 2049
> state: 0x15
>
>
> I am not sure of the motive of this command. Is the motive to set IP of NFS
> Server to set/change from Client.
>
> Though the current O/P and all is correct. But in this manner NFS will
> suffer. cd / ls or any other operation over nfs will hang like below:-
>
> [root@rrathore-upstream-sysfs nfs-utils]# df -h
>
> ^C
>
> If the motive was to set NFS Server IP, then it fails to do so as my NFS
> Server IP is still an old one and not 192.168.122.30.
>
>
> Just a suggestion, if you can post some examples in your man page it will
> be great.
>
>
> I am still performing some tests. Will keep you posted.
>
> Regards,
> Rahul



--

Thanks & Regards,

Rahul Rathore

STSE| Global Support Services
Red Hat India Private Limited, Pune
Ext: 8367125| Mob-9651798912 |IRC: rrathore