Bug 1304711 - Galera resource agent cannot connect to custom host/port
Galera resource agent cannot connect to custom host/port
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: resource-agents (Show other bugs)
Unspecified Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: Oyvind Albrigtsen
Ofer Blaut
: ZStream
Depends On: 1299404
  Show dependency treegraph
Reported: 2016-02-04 07:38 EST by Marcel Kolaja
Modified: 2016-02-16 06:17 EST (History)
11 users (show)

See Also:
Fixed In Version: resource-agents-3.9.5-54.el7_2.4
Doc Type: Bug Fix
Doc Text:
Cause: The galera resource agent is only able to connect to a local MariaDB socket. Consequence: The resource agent can fail due to uncontrolled events, like for instance max connection reached, or slow connections (e.g. when mariadb threadpool is engaged). Fix: Add support for custom host/port options, in order to benefit from MariaDB's extra-port and extra-max-connections. Result: Able to connect to other MariaDB resources.
Story Points: ---
Clone Of: 1299404
Last Closed: 2016-02-16 06:17:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marcel Kolaja 2016-02-04 07:38:15 EST
This bug has been copied from bug #1299404 and has been proposed
to be backported to 7.2 z-stream (EUS).
Comment 4 Damien Ciabrini 2016-02-05 09:21:46 EST
Instruction for test

While galera cluster is up, create a new user for the test

    create user 'testuser'@'%' identified by 'test';

Allow user to log in to a tcp socket

    grant all privileges on 'testuser'@'%';

Stop galera.

    pcs resource disable galera

Once stopped, change /etc/my.cnf.d/galera.cnf to have mysql listen to
port 4242 on an available interface:


Then configure /etc/sysconfig/clustercheck to make the resource
agent contact mysqld on the tcp port above. Modify the entries so
that the file looks like:


(don't set MYSQL_HOST to "localhost" otherwise mysql will try to
connect via UNIX socket)

Start galera again.

    pcs resource enable galera

After all machine are marked as master, verify that mysqld is listening
to port 4242.

    netstat -tnlp | grep mysqld

If so, the test is working as expected since the resource agent polls
mysqld regularly to ensure that galera has started properly and is
still running.

For cleaning up, stop galera, reset the two config files to their
original values, and restart galera. Once started, you can delete the
test user

    drop user 'testuser'@'%';
Comment 7 errata-xmlrpc 2016-02-16 06:17:38 EST
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.


Note You need to log in before you can comment on or make changes to this bug.