Galera ports

Nikolai Lifanov lifanov at
Tue Mar 31 19:20:36 UTC 2015

On 03/31/15 08:00, freebsd-ports-request at wrote:
> Hi!
> I'm a bit surprised that we don't have ports for galera cluster.
> I want to discuss about them a little bit.
> In short about galera and how it works (how I understand it):
> it's a kind of cluster of MySQL-based DBs. They support MySQL, Percona
> and MariaDB right now.
> Web site
> ~Components:
> 1. A special version of MySQL-based DB daemon, patched to work with
> wsrep API. It can be MySQL Galera Cluster, Percona XtraDB Cluster or
> MariaDB Galera CLuster.
> 2. A common "plugin" for them all, which is plugged in through my.cnf.
> It's called "Galera 3 wsrep provider library" usually.
> 3. Arbitrator - a DB daemon without data to prevent split-brain and etc.
> Cluster version of MySQL-based DB daemons are usually(always?) synced
> with non-cluster regular versions.
> We have a port only for #2 now - databases/galera (which is useless in
> such case, no?).
> There is no port for #3 at all.
> There are a couple of PRs to add #1 to ports tree, which were created
> about a year ago. No progress since then.
> However, I'd like to discuss about something. It's just my thoughts.
> 1. As you can see those PRs are trying to add *-server and *-client
> ports for each of clustered MySQL-based DBs (I know, not for Percona).
> Is there any need to add another yet version of client?
> What's a reason to make *-client ports? Because nothing depends on
> *-server ports.
> IMO we should use regular ports for clients and add only a server
> part, as Linuxes does. For example, databases/mysql56-client for MySQL
> Galera Cluster. In such case a lot of work to add a dependency for new
> *-client is not needed.
> 2. How *-server ports should be named? At first glance the obvious names are:
> databases/mysql5[56]-galera-cluster
> databases/percona5[56]-xtradb-cluster
> databases/mariadb(55|100)-galera-cluster
> Not bad, but what about the same names, but without (galera|xtradb)
> word? Or without "cluster" word.
> Like databases/mysql56-cluster next to databases/mysql56-server and
> databases/mysql56-client.
> How do you think?

I took a stab at this before: Percona XtraDB is the easiest to get
working, since pre-patched sources are available from the same master
site. The others need wsrep patches, which might not be sustainable to
carry as separate ports. I would propose to add something like WSREP
knob to existing mysql*-server ports that adds the extra patches and
then make slaves with WSREP option selected.

The Galera port proper was fixed not to crash on startup anymore in
ports r373590, and I tested it as far as getting MySQL 5.6 cluster to start.

I'm CC-ing relevant port maintainers to gauge the interest in adding an
WSREP option to existing ports and creating slave ports with this option
selected. This will make less sprawly as well. Thoughts?

- Nikolai Lifanov

More information about the freebsd-ports mailing list