idmapd: Fix error status when nfs-idmapd exits (bz 2001764)

Signed-off-by: Steve Dickson <steved@redhat.com>
Resolves: bz2001764
This commit is contained in:
Steve Dickson 2022-07-22 11:23:39 -04:00
parent fcb9c86c2c
commit c973e406cb
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,40 @@
commit 9abd3b4b57155dfdfd6895e6086ef550ee56fc49
Author: Wenchao Hao <haowenchao@huawei.com>
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 <haowenchao@huawei.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
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

View File

@ -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 <steved@redhat.com> 2.5.4-12
- idmapd: Fix error status when nfs-idmapd exits (bz 2001764)
* Sat Jul 16 2022 Steve Dickson <steved@redhat.com> 2.5.4-11
- nfs.man: adding new mount option max_connect (bz 2106848)
- systemd: Fix format-overflow warning (bz 2106896)