[MDEV-10233] Support bootstraping a Galera cluster with mysqld_multi Created: 2016-06-14  Updated: 2016-06-28  Resolved: 2016-06-28

Status: Closed
Project: MariaDB Server
Component/s: Galera, Scripts & Clients
Affects Version/s: 10.1.14
Fix Version/s: 10.1.15

Type: Bug Priority: Minor
Reporter: Hartmut Holzgraefe Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

linux



 Description   

Starting a Galera cluster with mysqld_multi currently requires to manually add (and later remove) --wsrep-new-cluster in the config block of the mysqld instance that is supposed to become the first cluster node.

I suggest to add a --new-cluster option to mysqld_multi that will add --wsrep-new-cluster to the mysqld command line of each server process started by mysqld_multi --new-cluster start ...



 Comments   
Comment by Hartmut Holzgraefe [ 2016-06-14 ]

Suggested patch:

diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index e3f8e50..19c94b1 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -47,6 +47,7 @@ $opt_help          = 0;
 $opt_log           = undef();
 $opt_mysqladmin    = "@bindir@/mysqladmin";
 $opt_mysqld        = "@libexecdir@/mysqld";
+$opt_new_cluster   = 0;
 $opt_no_log        = 0;
 $opt_password      = undef();
 $opt_tcp_ip        = 0;
@@ -125,7 +126,7 @@ sub main
 
   # We've already handled --no-defaults, --defaults-file, etc.
   if (!GetOptions("help", "example", "version", "mysqld=s", "mysqladmin=s",
-                  "user=s", "password=s", "log=s", "no-log",
+                  "user=s", "password=s", "log=s", "new-cluster", "no-log",
                   "tcp-ip",  "silent", "verbose"))
   {
     $flag_exit= 1;
@@ -378,6 +379,9 @@ sub start_mysqlds()
       $info_sent= 1;
     }
     $com.= $tmp;
+    if ($opt_new_cluster) {
+      $com.= " --wsrep-new-cluster";
+    }
     $com.= " >> $opt_log 2>&1" if (!$opt_no_log);
     $com.= " &";
     if (!$mysqld_found)

Comment by Nirbhay Choubey (Inactive) [ 2016-06-21 ]

http://lists.askmonty.org/pipermail/commits/2016-June/009471.html

Comment by Sergei Golubchik [ 2016-06-27 ]

ok to push

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