diff --git a/0004-nfs-blkmaped-Fix-the-error-status-when-nfs_blkmapd-s.patch b/0004-nfs-blkmaped-Fix-the-error-status-when-nfs_blkmapd-s.patch new file mode 100644 index 0000000000000000000000000000000000000000..30e9b7c622a4ca42eba9272bb2c06a4a0d2dad28 --- /dev/null +++ b/0004-nfs-blkmaped-Fix-the-error-status-when-nfs_blkmapd-s.patch @@ -0,0 +1,35 @@ +From 576d3569c025e829e4ce432103532fcf63808d39 Mon Sep 17 00:00:00 2001 +From: zhanchengbin +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 +--- + 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 + diff --git a/nfs-utils.spec b/nfs-utils.spec index 2ce90ae4c3901d5ef2ad14ec1bff4534122f4917..6524d36078cff14667b8379751c6dc46bac972f4 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -4,7 +4,7 @@ Name: nfs-utils Version: 2.5.1 -Release: 6 +Release: 7 Epoch: 1 Summary: The Linux NFS userland utility package 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 Patch2: 0002-fix-coredump-in-bl_add_disk.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: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2 @@ -224,6 +225,9 @@ fi %{_mandir}/*/* %changelog +* Tue Sep 6 2022 zhanchengbin - 1:2.5.1-7 +- nfs-blkmaped: Fix the error status when nfs_blkmapd stops + * Fri Jul 1 2022 liwenchong - 1:2.5.1-6 - 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