[Bug 271258] dns/powerdns: MySQL 8.0 client change removes wsrep (Galera) MySQL 5.7 cluster due to pkg conflict

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 05 May 2023 11:10:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271258

            Bug ID: 271258
           Summary: dns/powerdns: MySQL 8.0 client change removes wsrep
                    (Galera) MySQL 5.7 cluster due to pkg conflict
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: geoffrey.ongley@training247.com.au
                CC: tremere@cainites.net
                CC: tremere@cainites.net
             Flags: maintainer-feedback?(tremere@cainites.net)

When upgrading from FreeBSD 13.1 to 13.2, I performed a pkg upgrade but bumped
into some troubles with the PowerDNS binary package.

This change upgraded the PowerDNS package from 4.7.3 to 4.7.3_1 (which would
seemingly be an innocuous change, at least based on the version numbers).

However, it turns out this introduced a dependency change from the MySQL 5.7
client to MySQL 8 client: 

######################
Not yet upgraded host - 
root@ns3:~ # pkg info -dx powerdns
powerdns-4.7.3:
        lua54-5.4.4
        curl-7.87.0
        boost-libs-1.80.0_1
        sqlite3-3.40.1,1
        postgresql13-client-13.9
        mysql57-client-5.7.40 <<<<--- MySQL 5.7
        lmdb-0.9.29_1,1
powerdns-recursor-4.8.1:
        lua54-5.4.4
        boost-libs-1.80.0_1

-----
Upgraded host - 

root@ns4:~ # pkg info -dx powerdns
powerdns-4.7.3_1:
        lua54-5.4.4
        curl-8.0.1
        boost-libs-1.81.0
        sqlite3-3.41.2,1
        postgresql13-client-13.10
        mysql80-client-8.0.32 <<<<--- MySQL 8.0
        lmdb-0.9.29_1,1
powerdns-recursor-4.8.4:
        lua54-5.4.4
        boost-libs-1.81.0
######################

This change, in our case, therefore removes the MySQL 5.7 wsrep / Galera
cluster database I have setup across my PowerDNS nodes due to the MySQL 8
client. This cluster has been used to date to replicate the zones instantly -
but out it goes on upgrade:

######################
Installed packages to be REMOVED:
        mysql57-client: 5.7.40
        mysqlwsrep57-server: 5.7.39
#######################

AFAICT, MySQL 8 does not (yet?) have a wsrep patched version in the binary
package tree or ports, so from what I understand it's not just a simple case of
upgrading all nodes to MySQL 8 from the package tree, as there then will no
longer be a working Galera (replicated) cluster.

Nevertheless, hoping for the best - I tried anyway to see if wsrep was present
in the MySQL 8 server package after finding I was forced to MySQL 8
unexpectedly by the change in dependencies of this port due to the MySQL 8
client dependency.

It appears to me the wsrep patch for MySQL is not present here in the
mysql80-server package:

2023-05-05T10:45:33.056505Z 0 [ERROR] [MY-000067] [Server] unknown variable
'wsrep_on=ON'.
2023-05-05T10:45:33.056544Z 0 [ERROR] [MY-010119] [Server] Aborting

And it looks like only 5.6 and 5.7 has the needed wsrep patch at this time:
root@ns4:~ # pkg search wsrep
mysqlwsrep56-server-5.6.51_1   MySQL database enhanced with Galera replication
(server package)
mysqlwsrep57-server-5.7.39     MySQL database enhanced with Galera replication
(server package)

As such, for those using a Galera cluster (previously 5.7, as supported by the
previous version, 4.7.3 (instead of 4.7.3_1) - we're seemingly toast by this
minor update.

I could be wrong - but if I'm not, could we consider if this MySQL 8 client
dependency change could be reverted to MySQL 5.7? At least until there's a
wsrep patched MySQL in the pkg repo.

I'm guessing this change was not expected to have much, if any impact - but
with a galera cluster in place, it does impact seemingly.

I'm guessing rolling back is not necessarily straight forward as folks may have
already rolled forward, causing a bit of a conundrum. Maybe an alternate
solution is to not depend on a specific MySQL client, (I don't know if there is
a way to say 'any will do' - but I am not sure if this is possible, or a great
idea). 

The better approach I gather would be to push forward and work toward getting a
wsrep patched MySQL 8 server in the FreeBSD 13.2 binary package tree - but I
assume this is not there for a good reason (could be due to this:
https://github.com/codership/mysql-wsrep/issues/382).

Any advice/thoughts on how to handle this? I am not sure if there could be at
minimum a warning to folks performing this upgrade that it will break your
Galera cluster at this time if you're using ports/packages to supply MySQL 5.7
with Galera. Not sure. 

Anyway, I wanted to log this issue, so you're at least aware of it, and see if
there's anything we could do to improve the situation to help others avoid the
problem I just stumbled over with this update.

-- 
You are receiving this mail because:
You are the assignee for the bug.