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(). (cherry picked from commit 03a9b6b8ca77aa603d265289709eedf032278466)
This commit is contained in:
parent
6eeb14884b
commit
b16ac0016f
45
0003-idmapd-Fix-error-status-when-nfs-idmapd-exits.patch
Normal file
45
0003-idmapd-Fix-error-status-when-nfs-idmapd-exits.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 9abd3b4b57155dfdfd6895e6086ef550ee56fc49 Mon Sep 17 00:00:00 2001
|
||||
From: Wenchao Hao <haowenchao@huawei.com>
|
||||
Date: Tue, 22 Feb 2022 16:06:51 -0500
|
||||
Subject: [PATCH] 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>
|
||||
---
|
||||
utils/idmapd/idmapd.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
|
||||
index e2c160e..e79c124 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
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
Name: nfs-utils
|
||||
Version: 2.5.4
|
||||
Release: 2
|
||||
Release: 3
|
||||
Epoch: 1
|
||||
Summary: The Linux NFS userland utility package
|
||||
License: MIT and GPLv2 and GPLv2+ and BSD
|
||||
@ -15,6 +15,7 @@ Source0: https://www.kernel.org/pub/linux/utils/nfs-utils/%{version}/%{name}-%{v
|
||||
Patch0: 0000-systemd-idmapd-require-rpc-pipefs.patch
|
||||
Patch1: 0001-correct-the-statd-path-in-man.patch
|
||||
Patch2: 0002-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch
|
||||
Patch3: 0003-idmapd-Fix-error-status-when-nfs-idmapd-exits.patch
|
||||
|
||||
BuildRequires: libevent-devel,libcap-devel, libtirpc-devel libblkid-devel
|
||||
BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2
|
||||
@ -226,6 +227,9 @@ fi
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 24 2022 Wu Bo <wubo40@huawei.com> - 2.5.4-3
|
||||
- idmapd Fix error status when nfs idmapd exits
|
||||
|
||||
* Sat Jan 29 2022 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 2.5.4-2
|
||||
- In order to be consistent with the old versions, here we set
|
||||
use-gss-proxy to true in nfs.conf.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user