Fixes for RHEL-71352 and RHEL-151444
- nfsdctl: ignore ipv6 listener creation error (RHEL-71352) - nfsdclnts: fix display of stateids where the kernel doesn't provide the superblock (RHEL-151444) Resolves: RHEL-71352 Resolves: RHEL-151444 Signed-off-by: Scott Mayhew <smayhew@redhat.com>
This commit is contained in:
parent
968b55f7f5
commit
8f89e09ac1
@ -0,0 +1,39 @@
|
||||
From b59edc685f77d7c282a1dfca4187ebb703590cb6 Mon Sep 17 00:00:00 2001
|
||||
From: Frank Sorenson <sorenson@redhat.com>
|
||||
Date: Fri, 6 Mar 2026 17:04:20 -0500
|
||||
Subject: [nfs-utils PATCH] nfsdclnts: fix display of stateids where the kernel
|
||||
doesn't provide the superblock
|
||||
|
||||
If the stateid's file can't be found, the kernel will skip printing
|
||||
the superblock and filename in the 'states' procfile. When this
|
||||
happens, nfsdclnts crashes trying to reference the non-existent
|
||||
superblock key while getting the inode.
|
||||
|
||||
Fix this by setting the inode field to 'N/A' when the superblock
|
||||
isn't present, as is done with other fields which may be missing.
|
||||
|
||||
Signed-off-by: Frank Sorenson <sorenson@redhat.com>
|
||||
Signed-off-by: Steve Dickson <steved@redhat.com>
|
||||
---
|
||||
tools/nfsdclnts/nfsdclnts.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/nfsdclnts/nfsdclnts.py b/tools/nfsdclnts/nfsdclnts.py
|
||||
index b7280f2c..183a02ee 100755
|
||||
--- a/tools/nfsdclnts/nfsdclnts.py
|
||||
+++ b/tools/nfsdclnts/nfsdclnts.py
|
||||
@@ -87,7 +87,10 @@ def printer(data_list, argument):
|
||||
client_info = file_to_dict(client_info_path)
|
||||
for i in data_list:
|
||||
for key in i:
|
||||
- inode = i[key]['superblock'].split(':')[-1]
|
||||
+ try:
|
||||
+ inode = i[key]['superblock'].split(':')[-1]
|
||||
+ except:
|
||||
+ inode = 'N/A'
|
||||
# The ip address is quoted, so we dequote it.
|
||||
try:
|
||||
client_ip = client_info['address'][1:-1]
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
From 3b7de50fe8f59c64762a015693b705db5d0f15e7 Mon Sep 17 00:00:00 2001
|
||||
From: Olga Kornievskaia <okorniev@redhat.com>
|
||||
Date: Sun, 18 Jan 2026 14:30:45 -0500
|
||||
Subject: [nfs-utils PATCH] nfsdctl: ignore ipv6 listener creation error
|
||||
|
||||
If ipv6 is not supported by the kernel and during the nfsd start
|
||||
we are trying to create an ipv6 listener, ignore the error (this
|
||||
restores how nfsd handled this failure).
|
||||
|
||||
Fixes: 8b02f0d5590e ("nfsdctl: cleanup listeners if some failed")
|
||||
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
|
||||
Signed-off-by: Steve Dickson <steved@redhat.com>
|
||||
---
|
||||
utils/nfsdctl/nfsdctl.c | 19 ++++++++++++++++++-
|
||||
1 file changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/utils/nfsdctl/nfsdctl.c b/utils/nfsdctl/nfsdctl.c
|
||||
index e7a0e124..4a6ba1d6 100644
|
||||
--- a/utils/nfsdctl/nfsdctl.c
|
||||
+++ b/utils/nfsdctl/nfsdctl.c
|
||||
@@ -967,6 +967,17 @@ static void print_listeners(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static bool ipv6_is_enabled(void)
|
||||
+{
|
||||
+ int s;
|
||||
+
|
||||
+ s = socket(AF_INET6, SOCK_STREAM, 0);
|
||||
+ if (s < 0)
|
||||
+ return false;
|
||||
+ close(s);
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Format is <+/-><netid>:<address>:port
|
||||
*
|
||||
@@ -1081,7 +1092,8 @@ static int update_listeners(const char *str)
|
||||
continue;
|
||||
case AF_INET6:
|
||||
if (r6->sin6_port != l6->sin6_port ||
|
||||
- memcmp(&r6->sin6_addr, &l6->sin6_addr, sizeof(l6->sin6_addr)))
|
||||
+ memcmp(&r6->sin6_addr, &l6->sin6_addr, sizeof(l6->sin6_addr)) ||
|
||||
+ !ipv6_is_enabled())
|
||||
continue;
|
||||
default:
|
||||
|
||||
@@ -1127,6 +1139,11 @@ static int set_listeners(struct nl_sock *sock)
|
||||
struct server_socket *sock = &nfsd_sockets[i];
|
||||
struct nlattr *a;
|
||||
|
||||
+ if (sock->ss.ss_family == AF_INET6 && !ipv6_is_enabled()) {
|
||||
+ xlog(L_WARNING, "IPv6 isn't enabled, skip IPv6 "
|
||||
+ "listener\n");
|
||||
+ continue;
|
||||
+ }
|
||||
if (sock->ss.ss_family == 0)
|
||||
break;
|
||||
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
|
||||
Name: nfs-utils
|
||||
URL: http://linux-nfs.org/
|
||||
Version: 2.8.3
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Epoch: 1
|
||||
|
||||
# group all 32bit related archs
|
||||
@ -39,6 +39,12 @@ Patch015: nfs-utils-2.8.3-mountd-Separate-lookup-of-the-exported-directory-and.p
|
||||
Patch016: nfs-utils-2.8.3-support-Add-a-mini-library-to-extract-and-apply-RPC-.patch
|
||||
Patch017: nfs-utils-2.8.3-Fix-access-checks-when-mounting-subdirectories-in-NF.patch
|
||||
|
||||
#
|
||||
# RHEL 10.3
|
||||
#
|
||||
Patch018: nfs-utils-2.8.3-nfsdctl-ignore-ipv6-listener-creation-error.patch
|
||||
Patch019: nfs-utils-2.8.3-nfsdclnts-fix-display-of-stateids-where-the-kernel-d.patch
|
||||
|
||||
Patch100: nfs-utils-1.2.1-statdpath-man.patch
|
||||
Patch102: nfs-utils-1.2.5-idmap-errmsg.patch
|
||||
Patch103: nfs-utils-2.3.1-systemd-gssproxy-restart.patch
|
||||
@ -450,6 +456,10 @@ rm -rf /etc/systemd/system/rpc-*.requires
|
||||
%{_mandir}/*/nfsiostat.8.gz
|
||||
|
||||
%changelog
|
||||
* Thu Mar 19 2026 Scott Mayhew <smayhew@redhat.com> 2.8.3-6
|
||||
- nfsdctl: ignore ipv6 listener creation error (RHEL-71352)
|
||||
- nfsdclnts: fix display of stateids where the kernel doesn't provide the superblock (RHEL-151444)
|
||||
|
||||
* Fri Mar 6 2026 Scott Mayhew <smayhew@redhat.com> 2.8.3-5
|
||||
- mountd: Minor refactor of get_rootfh() (RHEL-127093)
|
||||
- mountd: Separate lookup of the exported directory and the mount path (RHEL-127093)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user