From c973e406cb16b9473ac3aadccb973beb3efdfd85 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Fri, 22 Jul 2022 11:23:39 -0400 Subject: [PATCH] idmapd: Fix error status when nfs-idmapd exits (bz 2001764) Signed-off-by: Steve Dickson Resolves: bz2001764 --- nfs-utils-2.5.4-rpcidmapd-return.patch | 40 ++++++++++++++++++++++++++ nfs-utils.spec | 6 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 nfs-utils-2.5.4-rpcidmapd-return.patch diff --git a/nfs-utils-2.5.4-rpcidmapd-return.patch b/nfs-utils-2.5.4-rpcidmapd-return.patch new file mode 100644 index 0000000..cd5ee1d --- /dev/null +++ b/nfs-utils-2.5.4-rpcidmapd-return.patch @@ -0,0 +1,40 @@ +commit 9abd3b4b57155dfdfd6895e6086ef550ee56fc49 +Author: Wenchao Hao +Date: Tue Feb 22 16:06:51 2022 -0500 + + idmapd: Fix error status when nfs-idmapd exits + + nfs-idmapd.service would report following error when stopped: + + Starting NFSv4 ID-name mapping service... + rpc.idmapd[1198]: Setting log level to 0 + Started NFSv4 ID-name mapping service. + rpc.idmapd[1198]: exiting on signal 15 + Stopping NFSv4 ID-name mapping service... + nfs-idmapd.service: Main process exited, code=exited, status=1/FAILURE + nfs-idmapd.service: Failed with result 'exit-code'. + Stopped NFSv4 ID-name mapping service. + + commit 93e8f092(idmapd: Add graceful exit and resource cleanup) + redirected SIGTERM, so when executing "systemctl stop nfs-idmapd", the + main() of idmapd would running to tail to return, while it returned 1 + which considered as error by systemd. + + So here just return 0 in main(). + + Signed-off-by: Wenchao Hao + Signed-off-by: Steve Dickson + +diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c +index e2c160e8..e79c124d 100644 +--- a/utils/idmapd/idmapd.c ++++ b/utils/idmapd/idmapd.c +@@ -474,7 +474,7 @@ main(int argc, char **argv) + event_free(svrdirev); + event_base_free(evbase); + +- return 1; ++ return 0; + } + + static void diff --git a/nfs-utils.spec b/nfs-utils.spec index e72ef76..79b92ae 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -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.5.4 -Release: 11%{?dist} +Release: 12%{?dist} Epoch: 1 # group all 32bit related archs @@ -29,6 +29,7 @@ Patch006: nfs-utils-2.5.4-rpcctl.patch # Patch007: nfs-utils-2.5.4-nfsman-maxconnect.patch Patch008: nfs-utils-2.5.4-rpcpipefs-warn.patch +Patch009: nfs-utils-2.5.4-rpcidmapd-return.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch @@ -460,6 +461,9 @@ fi %{_mandir}/*/nfsiostat.8.gz %changelog +* Fri Jul 22 2022 Steve Dickson 2.5.4-12 +- idmapd: Fix error status when nfs-idmapd exits (bz 2001764) + * Sat Jul 16 2022 Steve Dickson 2.5.4-11 - nfs.man: adding new mount option max_connect (bz 2106848) - systemd: Fix format-overflow warning (bz 2106896)