nfs-blkmaped: Fix the error status when nfs_blkmapd stops
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com> (cherry picked from commit 5f5ffefed5db44588fdf01dc2ded564f4bbb3ee3)
This commit is contained in:
parent
d9606ef651
commit
6d3743b92d
@ -0,0 +1,35 @@
|
|||||||
|
From 576d3569c025e829e4ce432103532fcf63808d39 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhanchengbin <zhanchengbin1@huawei.com>
|
||||||
|
Date: Tue, 6 Sep 2022 09:49:30 +0800
|
||||||
|
Subject: [PATCH] nfs-blkmaped: Fix the error status when nfs_blkmapd stops
|
||||||
|
|
||||||
|
The systemctl stop nfs-blkmap.service will sends the SIGTERM signal
|
||||||
|
to the nfs-blkmap.service first.If the process fails to be stopped,
|
||||||
|
it sends the SIGKILL signal again to kill the process.
|
||||||
|
However, exit(1) is executed in the SIGTERM processing function of
|
||||||
|
nfs-blkmap.service. As a result, systemd receives an error message
|
||||||
|
indicating that nfs-blkmap.service failed.
|
||||||
|
"Active: failed" is displayed when the systemctl status
|
||||||
|
nfs-blkmap.service command is executed.
|
||||||
|
|
||||||
|
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
|
||||||
|
---
|
||||||
|
utils/blkmapd/device-discovery.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c
|
||||||
|
index 77ebe73..8ca548c 100644
|
||||||
|
--- a/utils/blkmapd/device-discovery.c
|
||||||
|
+++ b/utils/blkmapd/device-discovery.c
|
||||||
|
@@ -462,7 +462,7 @@ static void sig_die(int signal)
|
||||||
|
unlink(PID_FILE);
|
||||||
|
}
|
||||||
|
BL_LOG_ERR("exit on signal(%d)\n", signal);
|
||||||
|
- exit(1);
|
||||||
|
+ exit(0);
|
||||||
|
}
|
||||||
|
static void usage(void)
|
||||||
|
{
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: nfs-utils
|
Name: nfs-utils
|
||||||
Version: 2.5.1
|
Version: 2.5.1
|
||||||
Release: 6
|
Release: 7
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: The Linux NFS userland utility package
|
Summary: The Linux NFS userland utility package
|
||||||
License: MIT and GPLv2 and GPLv2+ and BSD
|
License: MIT and GPLv2 and GPLv2+ and BSD
|
||||||
@ -16,6 +16,7 @@ Patch0: 0000-systemd-idmapd-require-rpc-pipefs.patch
|
|||||||
Patch1: 0001-correct-the-statd-path-in-man.patch
|
Patch1: 0001-correct-the-statd-path-in-man.patch
|
||||||
Patch2: 0002-fix-coredump-in-bl_add_disk.patch
|
Patch2: 0002-fix-coredump-in-bl_add_disk.patch
|
||||||
Patch3: 0003-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch
|
Patch3: 0003-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch
|
||||||
|
Patch4: 0004-nfs-blkmaped-Fix-the-error-status-when-nfs_blkmapd-s.patch
|
||||||
|
|
||||||
BuildRequires: libevent-devel,libcap-devel, libtirpc-devel libblkid-devel
|
BuildRequires: libevent-devel,libcap-devel, libtirpc-devel libblkid-devel
|
||||||
BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2
|
BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2
|
||||||
@ -224,6 +225,9 @@ fi
|
|||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 6 2022 zhanchengbin <zhanchengbin@huawei.com> - 1:2.5.1-7
|
||||||
|
- nfs-blkmaped: Fix the error status when nfs_blkmapd stops
|
||||||
|
|
||||||
* Fri Jul 1 2022 liwenchong <liwenchong@kylinos.cn> - 1:2.5.1-6
|
* Fri Jul 1 2022 liwenchong <liwenchong@kylinos.cn> - 1:2.5.1-6
|
||||||
- set use-gss-proxy to true in nfs.conf to be consistent with the
|
- set use-gss-proxy to true in nfs.conf to be consistent with the
|
||||||
description of 0003-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch
|
description of 0003-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user