[MDEV-19161] Let galera_new_cluster use "restart" instead of "start" Created: 2019-04-03  Updated: 2022-05-23  Resolved: 2022-05-12

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.3.14
Fix Version/s: 10.3.35, 10.4.25, 10.5.16, 10.6.8, 10.7.4, 10.8.3, 10.9.1

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: newFeature, systemd
Environment:

Linux / SystemD



 Description   

The galera_new_cluster command uses "systemctl start" to start up a the initial node of a new galera cluster.

Unfortunately "systemctl start" does nothing when a service is already started, it just returns success right away. And so does galera_new_cluster then, even though it didn't actually create a new cluster at all.

So I suggest to change "systemctl start" in the script to "systemctl restart", to enforce a fresh mysqld process start even in cases where the mariadb process is already running.



 Comments   
Comment by Daniel Black [ 2022-05-05 ]

Look like a clear 10.3 bug to me.

Comment by Jan Lindström (Inactive) [ 2022-05-11 ]

hholzgra That would mean you can have only one cluster / machine is that intended behavior? (e.g. I have tested 2 cluster cases).

Comment by Hartmut Holzgraefe [ 2022-05-11 ]

For that you can use systemd service templates and pass in a specific name, e.g.

galera_new_cluster mariadb@node1

https://mariadb.com/kb/en/getting-started-with-mariadb-galera-cluster/#systemd-and-bootstrapping

Generated at Thu Feb 08 08:49:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.