mariadb-10.1.18 breaks the resource agent

Bug #1638864 reported by Michele Baldessari
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Michele Baldessari

Bug Description

So in mariadb-10.1.18 this change was included upstream:
commit 7497ebf8a49bfe30bb4110f2ac20a30f804b7946
Author: Sergei Golubchik <email address hidden>
Date: Thu Sep 29 10:16:24 2016 +0200

    mysqld_safe: close stdout and stderr

    when they're not needed anymore. Helps when
    daemonizing it from mysql.init

diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 7f18abb3dc25..7cadce725d1f 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -620,6 +620,10 @@ else
   logging=syslog
 fi

+# close stdout and stderr, everything goes to $logging now
+exec 1>&-
+exec 2>&-
+
 USER_OPTION=""
 if test -w / -o "$USER" = "root"
 then
@@ -650,7 +654,7 @@ if [ ! -d $mysql_unix_port_dir ]
 then
   if ! `mkdir -p $mysql_unix_port_dir`
   then
- echo "Fatal error Can't create database directory '$mysql_unix_port'"
+ log_error "Fatal error Can't create database directory '$mysql_unix_port'"
     exit 1
   fi
   chown $user $mysql_unix_port_dir
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index e5c8814f9307..d4fff33af13d 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -308,7 +308,7 @@ case "$mode" in
     then
       # Give extra arguments to mysqld with the my.cnf file. This script
       # may be overwritten at next upgrade.
- $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null &
+ $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args &
       wait_for_ready; return_value=$?

       # Make lock for RedHat / SuSE

This makes it so that the mysqld_safe --wsrep-recover command which is used by the resource agent breaks badly, because no output is generated at all.

Damien will look into making the Resource Agent work in this situation as well, but this will take time until the fix gets in RHEL->CentOS. My recommendation is that we get the RDO folks to build a package which backs out the above specific change and keep this mariadb version (or a later one since 10.1.19 has been released today and it fixes 2 more CVEs)

Tags: ci
Changed in tripleo:
assignee: nobody → Michele Baldessari (michele)
milestone: none → ocata-1
Revision history for this message
Michele Baldessari (michele) wrote :

1) https://github.com/rdo-common/mariadb/pull/2 is the fix for mariadb
2) https://bugzilla.redhat.com/show_bug.cgi?id=1391470 tracks the fix for the resource agent

Once 2) is in centos we can back out the revert pushed via 1)

Revision history for this message
Emilien Macchi (emilienm) wrote :

package manually promoted in RDO and synced in buildlogs for ocata.

Changed in tripleo:
status: New → Fix Released
tags: removed: alert
Revision history for this message
Emilien Macchi (emilienm) wrote :

We're still seeing the issue with new package... Under investigation.

Changed in tripleo:
status: Fix Released → In Progress
tags: added: alert
Revision history for this message
Michele Baldessari (michele) wrote :

It is fixed now via mariadb-10.1.18-3

tags: removed: alert
Changed in tripleo:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.