|
|
c608c9 |
From 328b228321e71260f9c0ea4b926b43f208aef158 Mon Sep 17 00:00:00 2001
|
|
|
c608c9 |
From: David Vossel <dvossel@redhat.com>
|
|
|
c608c9 |
Date: Tue, 7 Oct 2014 16:11:28 -0400
|
|
|
c608c9 |
Subject: [PATCH 2/2] High: mysql-common: avoid use of check_binary in common
|
|
|
c608c9 |
validation function.
|
|
|
c608c9 |
|
|
|
c608c9 |
Since the environment validation exit code needs to be interpreted
|
|
|
c608c9 |
differently now for monitor operations, we need to avoid functions like
|
|
|
c608c9 |
'check_binary' that exit the process immediately upon failure. Instead
|
|
|
c608c9 |
we should use 'have_binary' in this situation.
|
|
|
c608c9 |
|
|
|
c608c9 |
This allows the mysql agent to work properly in a scenario where the entire
|
|
|
c608c9 |
mysql install resides on shared storage.
|
|
|
c608c9 |
---
|
|
|
c608c9 |
heartbeat/mysql-common.sh | 12 ++++++++++--
|
|
|
c608c9 |
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
c608c9 |
|
|
|
c608c9 |
diff --git a/heartbeat/mysql-common.sh b/heartbeat/mysql-common.sh
|
|
|
c608c9 |
index a02f8cd..310f487 100755
|
|
|
c608c9 |
--- a/heartbeat/mysql-common.sh
|
|
|
c608c9 |
+++ b/heartbeat/mysql-common.sh
|
|
|
c608c9 |
@@ -94,8 +94,16 @@ CRM_ATTR_REPL_INFO="${HA_SBIN_DIR}/crm_attribute --type crm_config --name ${INST
|
|
|
c608c9 |
|
|
|
c608c9 |
mysql_common_validate()
|
|
|
c608c9 |
{
|
|
|
c608c9 |
- check_binary $OCF_RESKEY_binary
|
|
|
c608c9 |
- check_binary $OCF_RESKEY_client_binary
|
|
|
c608c9 |
+
|
|
|
c608c9 |
+ if ! have_binary "$OCF_RESKEY_binary"; then
|
|
|
c608c9 |
+ ocf_exit_reason "Setup problem: couldn't find command: $OCF_RESKEY_binary"
|
|
|
c608c9 |
+ return $OCF_ERR_INSTALLED;
|
|
|
c608c9 |
+ fi
|
|
|
c608c9 |
+
|
|
|
c608c9 |
+ if ! have_binary "$OCF_RESKEY_client_binary"; then
|
|
|
c608c9 |
+ ocf_exit_reason "Setup problem: couldn't find command: $OCF_RESKEY_client_binary"
|
|
|
c608c9 |
+ return $OCF_ERR_INSTALLED;
|
|
|
c608c9 |
+ fi
|
|
|
c608c9 |
|
|
|
c608c9 |
if [ ! -f $OCF_RESKEY_config ]; then
|
|
|
c608c9 |
ocf_exit_reason "Config $OCF_RESKEY_config doesn't exist";
|
|
|
c608c9 |
--
|
|
|
c608c9 |
1.8.4.2
|
|
|
c608c9 |
|