Bug 1391470

Summary: Galera resource agent cannot recover WSREP last commit with recent mariadb version
Product: Red Hat Enterprise Linux 7 Reporter: Damien Ciabrini <dciabrin>
Component: resource-agentsAssignee: Damien Ciabrini <dciabrin>
Status: CLOSED ERRATA QA Contact: Asaf Hirshberg <ahirshbe>
Severity: high Docs Contact:
Priority: medium    
Version: 7.3CC: agk, cluster-maint, dciabrin, fdinitto, michele, mnovacek, oalbrigt, royoung, rscarazz, ushkalim
Target Milestone: rc   
Target Release: 7.4   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: resource-agents-3.9.5-84.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 14:55:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Damien Ciabrini 2016-11-03 11:55:49 UTC
Description of problem:

Starting with mariadb 10.1.18, mysqld_safe does no longer output the WSREP last commit to the standard output when called with command line option --wsrep-recover. Instead, it logs that information into mariadb's error log.

Because of this change, the galera resource agent can no longer recover the information and cannot determine the node to bootstrap the galera cluster from.

RDO Openstack uses the galera resource agent from CentOS, which is sync'd from RHEL, but they recently switched to mariadb 10.1.18, which prevents the galera cluster from starting.  

How reproducible:
Always starting with mariadb 10.1.18

Steps to Reproduce:
1. create a galera resource in pacemaker
2. enable the resource

Actual results:
the galera cluster won't come up, resource stuck in slave

Expected results:
the cluster should come up

Additional info:

Comment 1 Michele Baldessari 2016-11-03 13:08:10 UTC
For the time being in upstream we will back out the commit that changed this behaviour in "mysqld_safe --wsrep-recover" via https://bugs.launchpad.net/tripleo/+bug/1638864

Once we land a fix in the RA we can remove the revert of the offending patch

Comment 3 Damien Ciabrini 2016-11-18 13:55:26 UTC
Proposed fix in https://github.com/ClusterLabs/resource-agents/pull/884 has been merged in upstream.

Comment 7 Damien Ciabrini 2017-01-03 15:22:13 UTC
Proposed high level steps for testing:
- Test with RDO to verify that fix works with mariadb 10:
  . Deploy a Newton stack with 3-node HA controllers 
  . Once done, stop galera service: "pcs resource disable galera"
  . install the test resource-agents package
  . downgrade mariadb* packages to 10.1.18-2 on all controllers, to reintroduce the breaking change in mariadb [1]
  . restart galera: "pcs resource enable galera"
  . ensure that all galera nodes have restarted with "pcs status"

- Test with RHEL to verify that fix doesn't introduce regression with mariadb 5.5
  . Deploy an OSP10 with 3-node HA controllers
  . Once done, stop galera service: "pcs resource disable galera"
  . install the test resource-agents package
  . restart galera: "pcs resource enable galera"
  . ensure that all galera nodes have restarted with "pcs status"
  

[1] see https://bugs.launchpad.net/tripleo/+bug/1638864

Comment 8 Raoul Scarazzini 2017-01-05 15:37:17 UTC
(In reply to Damien Ciabrini from comment #7)
> Proposed high level steps for testing:
> - Test with RDO to verify that fix works with mariadb 10:
>   . Deploy a Newton stack with 3-node HA controllers 
>   . Once done, stop galera service: "pcs resource disable galera"
>   . install the test resource-agents package
>   . downgrade mariadb* packages to 10.1.18-2 on all controllers, to
> reintroduce the breaking change in mariadb [1]
>   . restart galera: "pcs resource enable galera"
>   . ensure that all galera nodes have restarted with "pcs status"

I made this validation test on the latest CentOS (7.3.1611), stopping galera, downgrading on all the controllers the galera packages (yum -y downgrade mariadb*-10.1.18-2.el7.x86_64) and then restarting with success the galera resource with pcs.

> - Test with RHEL to verify that fix doesn't introduce regression with
> mariadb 5.5
>   . Deploy an OSP10 with 3-node HA controllers
>   . Once done, stop galera service: "pcs resource disable galera"
>   . install the test resource-agents package
>   . restart galera: "pcs resource enable galera"
>   . ensure that all galera nodes have restarted with "pcs status"
>   
> 
> [1] see https://bugs.launchpad.net/tripleo/+bug/1638864

Comment 9 Asaf Hirshberg 2017-02-27 13:21:15 UTC
Verified on osp-10 latest on rhel, using steps from comment #8

Comment 10 errata-xmlrpc 2017-08-01 14:55:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1844