Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2081934

Summary: rpcctl - fix failure when setting xprt offline and online
Product: Red Hat Enterprise Linux 9 Reporter: Yongcheng Yang <yoyang>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: xzhou
Target Milestone: rcKeywords: Patch, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nfs-utils-2.5.4-12.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 11:22:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yongcheng Yang 2022-05-05 03:29:13 UTC
Description of problem:
The newly introduced tool "rpcctl" fails to set xprt (system transports) to offline/online state.

Version-Release number of selected component (if applicable):
nfs-utils-2.5.4-10.el9

How reproducible:
always

Steps to Reproduce:
1. rpcctl xprt set xprt-0 offline
2.
3.

Actual results:
# rpcctl xprt show
xprt-0: local, /var/run/gssproxy.sock, port 0, state <CONNECTED,BOUND>, main
	Source: (einval), port 0, Requests: 2
	Congestion: cur 0, win 256, Slots: min 2, max 65536
	Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0
xprt-1: local, /var/run/rpcbind.sock, port 0, state <CONNECTED,BOUND>, main
	Source: (einval), port 0, Requests: 2
	Congestion: cur 0, win 256, Slots: min 2, max 65536
	Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0
xprt-2: tcp, 192.168.122.218, port 0, state <CONNECTED,BOUND>, main
	Source: 192.168.122.14, port 0, Requests: 2
	Congestion: cur 0, win 256, Slots: min 2, max 2
	Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0

# rpcctl xprt set xprt-1 offline
'Namespace' object has no attribute 'set_state'

# rpcctl xprt show xprt-1
xprt-1: local, /var/run/rpcbind.sock, port 0, state <CONNECTED,BOUND>, main
	Source: (einval), port 0, Requests: 2
	Congestion: cur 0, win 256, Slots: min 2, max 65536
	Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0

# rpcctl xprt set xprt-2 offline
'Namespace' object has no attribute 'set_state'

# rpcctl xprt show xprt-2
xprt-2: tcp, 192.168.122.218, port 0, state <CONNECTED,BOUND>, main
	Source: 192.168.122.14, port 0, Requests: 2
	Congestion: cur 0, win 256, Slots: min 2, max 2
	Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0

# rpcctl xprt set xprt-0 offline
'Namespace' object has no attribute 'set_state'

# rpcctl xprt show xprt-0
xprt-0: local, /var/run/gssproxy.sock, port 0, state <CONNECTED,BOUND>, main
	Source: (einval), port 0, Requests: 2
	Congestion: cur 0, win 256, Slots: min 2, max 65536
	Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0

Expected results:


Additional info:

Comment 1 Yongcheng Yang 2022-05-27 05:10:26 UTC
commit 6a0a107e1ded470af827e1d416515c77b214a12e
Author: Anna Schumaker <Anna.Schumaker>

     rpcctl: Print a message if the user tries to modify a main xprt

commit 1393b549eb80761d5f8c6b2c9ed711fb55b507d1
Author: Anna Schumaker <Anna.Schumaker>

     rpcctl: Use the correct function for setting xprts offline and online

Comment 6 Yongcheng Yang 2022-07-25 03:14:28 UTC
Patches are already available in nfs-utils-2.5.4-12.el9 now:

---------------------------------------
[root@yoyang-rhel-910-202207211x8664 ~]# rpcctl xprt set xprt-0
usage: rpcctl xprt set [-h] XPRT {online,offline,dstaddr} ...
[root@yoyang-rhel-910-202207211x8664 ~]# rpcctl xprt set xprt-0 offline
Main xprts cannot be set offline
[root@yoyang-rhel-910-202207211x8664 ~]# rpcctl xprt set xprt-1 offline
Main xprts cannot be set offline
[root@yoyang-rhel-910-202207211x8664 ~]# rpcctl xprt set xprt-2 offline
[Errno 22] Invalid argument
[root@yoyang-rhel-910-202207211x8664 ~]# rpcctl xprt set xprt-3 offline
[Errno 22] Invalid argument
[root@yoyang-rhel-910-202207211x8664 ~]# rpm -q nfs-utils
nfs-utils-2.5.4-12.el9.x86_64
[root@yoyang-rhel-910-202207211x8664 ~]#
[root@yoyang-rhel-910-202207211x8664 ~]# rpcctl xprt show
xprt-0: local, /var/run/rpcbind.sock, port 0, state <CONNECTED,BOUND>, main
        Source: (einval), port 0, Requests: 2
        Congestion: cur 0, win 256, Slots: min 2, max 65536
        Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0
xprt-1: local, /var/run/gssproxy.sock, port 0, state <CONNECTED,BOUND>, main
        Source: (einval), port 0, Requests: 2
        Congestion: cur 0, win 256, Slots: min 2, max 65536
        Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0
xprt-2: tcp, 127.0.0.1, port 0, state <BOUND>
        Source: (enoent), port 0, Requests: 0
        Congestion: cur 0, win 0, Slots: min 0, max 0
        Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0
xprt-3: tcp, 127.0.0.1, port 0, state <>
        Source: (enoent), port 0, Requests: 0
        Congestion: cur 0, win 0, Slots: min 0, max 0
        Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0
[root@yoyang-rhel-910-202207211x8664 ~]#

Comment 12 errata-xmlrpc 2022-11-15 11:22:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nfs-utils bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8376