Bug + fix: galera_new_cluster is broken

No idea how to report a bug at bugs.almalinux.com, can’t create an account. So here it is:

galera_new_cluster is broken in mariadb-10.11.15-1.el10_1.x86_64. The work around is simple, add this file “/etc/systemd/system/mariadb.service.d/fix_galera_new_cluster.conf”:

[Service]
# Use an environment file to pass variable _WSREP_NEW_CLUSTER
# This should be taken care of by /usr/lib/systemd/system/mariadb.service
# but is lacking in mariadb-10.11.15-1.el10_1.x86_64, it's probably a bug
EnvironmentFile=-/run/mariadb/wsrep-new-cluster

For reference: this part is included in /usr/lib/systemd/system/mariadb.service in mariadb10.11-10.11.15-2.el10.src.rpm on Centos Stream.

Without the work around galera_new_cluster always fails because it tries to start a node as usual, which won’t work if it’s the first node that needs bootstrapping.

Hello
You can log in to the bug reporting site with the account you use to log in here.