From f6c8b1c774d6179542acbcd2bedfa1ed26bf8c12 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Fri, 25 Nov 2022 06:10:14 +0000 Subject: [PATCH] import resource-agents-4.9.0-35.el8 --- ...ql-common-return-error-if-kill-fails.patch | 25 +++++++++++++++++++ SPECS/resource-agents.spec | 10 +++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 SOURCES/bz2139131-mysql-common-return-error-if-kill-fails.patch diff --git a/SOURCES/bz2139131-mysql-common-return-error-if-kill-fails.patch b/SOURCES/bz2139131-mysql-common-return-error-if-kill-fails.patch new file mode 100644 index 0000000..e6267f8 --- /dev/null +++ b/SOURCES/bz2139131-mysql-common-return-error-if-kill-fails.patch @@ -0,0 +1,25 @@ +From 97a05e0e662ed922c9ecd016b39ab90ee233d5c9 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Thu, 24 Nov 2022 10:36:56 +0100 +Subject: [PATCH] mysql-common: return error in stop-action if kill fails to + stop the process, so the node can get fenced + +--- + heartbeat/mysql-common.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/heartbeat/mysql-common.sh b/heartbeat/mysql-common.sh +index 34e1c6748..8104019b0 100755 +--- a/heartbeat/mysql-common.sh ++++ b/heartbeat/mysql-common.sh +@@ -318,6 +318,10 @@ mysql_common_stop() + if [ $? != $OCF_NOT_RUNNING ]; then + ocf_log info "MySQL failed to stop after ${shutdown_timeout}s using SIGTERM. Trying SIGKILL..." + /bin/kill -KILL $pid > /dev/null ++ mysql_common_status info $pid ++ if [ $? != $OCF_NOT_RUNNING ]; then ++ return $OCF_ERR_GENERIC ++ fi + fi + + ocf_log info "MySQL stopped"; diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec index 8ab6c48..4c212a8 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -69,7 +69,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.9.0 -Release: 34%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 35%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -130,6 +130,7 @@ Patch38: bz2133682-IPsrcaddr-proto-metric-scope-default-route-fixes.patch Patch39: bz2141836-vdo-vol-dont-fail-probe-action.patch Patch40: bz2049319-Filesystem-add-support-for-Amazon-EFS.patch Patch41: bz2127117-nfsserver-nfsv4_only-parameter.patch +Patch42: bz2139131-mysql-common-return-error-if-kill-fails.patch # bundle patches Patch1000: 7-gcp-bundled.patch @@ -351,6 +352,7 @@ exit 1 %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -926,6 +928,12 @@ ccs_update_schema > /dev/null 2>&1 ||: %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Thu Nov 24 2022 Oyvind Albrigtsen - 4.9.0-35 +- mysql-common: return error in stop-action if kill fails to stop + the process, so the node can get fenced + + Resolves: rhbz#2139131 + * Tue Nov 22 2022 Oyvind Albrigtsen - 4.9.0-34 - nfsserver: add nfsv4_only parameter to make it run without rpc-statd/rpcbind services