You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1 KiB

From 2754db9d03995e944a53e364f304bc7b0b24d75d Mon Sep 17 00:00:00 2001
From: Damien Ciabrini <dciabrin@redhat.com>
Date: Thu, 2 Mar 2017 18:41:50 +0100
Subject: [PATCH] galera: fix permission of temporary log file for mariadb
10.1.21+
Since MariaDB/server@8fcdd6b0ecbb966f4479856efe93a963a7a422f7,
mysqld_safe relies on a helper subprocess to write into log files.
This new logging mechanism expects log file to be writable by the
user configured to run mysqld.
Fix the generation of temporary log file accordingly.
---
heartbeat/galera | 1 +
1 file changed, 1 insertion(+)
diff --git a/heartbeat/galera b/heartbeat/galera
index 0cab9a464..decbaa257 100755
--- a/heartbeat/galera
+++ b/heartbeat/galera
@@ -520,6 +520,7 @@ detect_last_commit()
last_commit="$(cat ${OCF_RESKEY_datadir}/grastate.dat | sed -n 's/^seqno.\s*\(.*\)\s*$/\1/p')"
if [ -z "$last_commit" ] || [ "$last_commit" = "-1" ]; then
local tmp=$(mktemp)
+ chown $OCF_RESKEY_user:$OCF_RESKEY_group $tmp
# if we pass here because grastate.dat doesn't exist,
# try not to bootstrap from this node if possible