resource-agents/SOURCES/bz1765128-mysql-galera-fix-incorrect-rc.patch
2021-09-10 03:52:59 +00:00

47 lines
1.9 KiB
Diff

From c718050a4a2bb47d640af1d8e19995590755670f Mon Sep 17 00:00:00 2001
From: Valentin Vidic <vvidic@debian.org>
Date: Wed, 23 Oct 2019 22:04:44 +0200
Subject: [PATCH] Low: mysql-common: fix startup check
PID value is not capture correctly so the startup
fails with the wrong exit code.
Starting 'mysql' case 8 'check lib file':
Setting agent environment: export OCF_RESKEY_CRM_meta_timeout=15000
Setting system environment: chmod u-w /var/lib/mysql
Running agent: ./mysql start
ERROR: The agent was hanging, killed it, maybe you damaged the agent or system's environment, see details below:
Oct 23 18:46:06 INFO: MySQL is not running
runuser: warning: cannot change directory to /nonexistent: No such file or directory
runuser: warning: cannot change directory to /nonexistent: No such file or directory
runuser: warning: cannot change directory to /nonexistent: No such file or directory
Oct 23 18:46:06 INFO: MySQL is not running
Oct 23 18:46:08 INFO: MySQL is not running
Oct 23 18:46:10 INFO: MySQL is not running
Oct 23 18:46:12 INFO: MySQL is not running
Oct 23 18:46:14 INFO: MySQL is not running
Oct 23 18:46:16 INFO: MySQL is not running
Oct 23 18:46:18 INFO: MySQL is not running
Oct 23 18:46:20 INFO: MySQL is not running
Oct 23 18:46:22 INFO: MySQL is not running
Oct 23 18:46:24 INFO: MySQL is not running
---
heartbeat/mysql-common.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/heartbeat/mysql-common.sh b/heartbeat/mysql-common.sh
index d1b1ddb96..4004a6b65 100755
--- a/heartbeat/mysql-common.sh
+++ b/heartbeat/mysql-common.sh
@@ -239,8 +239,8 @@ mysql_common_start()
--datadir=$OCF_RESKEY_datadir \
--log-error=$OCF_RESKEY_log \
$OCF_RESKEY_additional_parameters \
- $mysql_extra_params >/dev/null 2>&1 &
- pid=$!"
+ $mysql_extra_params >/dev/null 2>&1" &
+ pid=$!
# Spin waiting for the server to come up.
# Let the CRM/LRM time us out if required.