Setting config "databases-to-replicate" breaks Galera replication

Bug #1934680 reported by Sérgio Manso
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Percona Cluster Charm
Fix Released
Low
Billy Olsen

Bug Description

When setting "databases-to-replicate" option, Galera cluster replicates the databases but tables are empty.
From the documentation in charmhub, setting this option should not affect Galera synchronous replication.

This issue is currently affecting an ongoing deployment. The main goal is to establish asynchronous replication between two databases and excluding Vault db's from the process.

Environment:

Ubuntu 18.04
cs:percona-cluster-297
Juju 2.8.11

Steps to reproduce

1) Deploy a percona-cluster with 3 units using the attached bundle
2) make sure the databases-to-replicate is set
3) on mysql/0: create a database, a table and insert some values
4) check mysql/1 and mysql/2: database is created but tables are empty

Notes:

A recent version of Galera cluster[1] introduced a new option that allows ignoring native replication filter rules if configured with replicate-do-db.
However, wsrep_mode is only available with Galera 4.0 [2] which was not backported to bionic yet.

[1] https://galeracluster.com/2021/01/galera-cluster-for-mysql-5-6-50-5-7-32-and-8-0-22-released/
[2] https://galeracluster.com/library/documentation/mysql-wsrep-options.html#wsrep-mode

Revision history for this message
Sérgio Manso (sergiomanso) wrote :
Revision history for this message
Billy Olsen (billy-olsen) wrote :

Confirmed by looking at the code. The hooks provide the databases_to_replicate value down to the template engine for the mysql options without first validating that there is an asynchronous replication relation established.

For consideration of backporting the wsrep mode enhancement to Bionic a separate bug will need to be raised.

Changed in charm-percona-cluster:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Billy Olsen (billy-olsen)
milestone: none → 21.10
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-percona-cluster (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-percona-cluster (master)

Reviewed: https://review.opendev.org/c/openstack/charm-percona-cluster/+/804805
Committed: https://opendev.org/openstack/charm-percona-cluster/commit/fc9b9dbcb9bfa26d37aa8e6afe6540591ddd72e5
Submitter: "Zuul (22348)"
Branch: master

commit fc9b9dbcb9bfa26d37aa8e6afe6540591ddd72e5
Author: Billy Olsen <email address hidden>
Date: Mon Aug 16 16:46:08 2021 -0700

    Don't configure databases to replicate w/out async

    Check that that the asynchronous replication relations exist prior
    to providing the databases_to_replicate to the templating engine
    code. Specifying the databases-to-replicate config option is not
    supposed to apply when the asynchronous relation is not established.

    Closes-Bug: #1934680
    Change-Id: Iedd0532268f0bf533305412105590c5afdd7c0ec

Changed in charm-percona-cluster:
status: In Progress → Fix Committed
Changed in charm-percona-cluster:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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