[Commits] Rev 3509: MDEV#6399 - Make galera test suite run with --parallel in lp:~maria-captains/maria/maria-5.5-galera

Nirbhay Choubey nirbhay at skysql.com
Fri Jul 11 19:03:09 EEST 2014


At lp:~maria-captains/maria/maria-5.5-galera

------------------------------------------------------------
revno: 3509
revision-id: nirbhay at skysql.com-20140711160302-1ohioy1x5fazrc7e
parent: nirbhay at skysql.com-20140709150428-ojo8tahtk9xata5c
committer: Nirbhay Choubey <nirbhay at skysql.com>
branch nick: maria-5.5-galera_6399
timestamp: Fri 2014-07-11 12:03:02 -0400
message:
  MDEV#6399 - Make galera test suite run with --parallel
  
  Galera tests used default base/SST ports which led to
  failures due to port conflicts when run in parallel.
  Fixed by setting them to ones generated by mtr framework.
-------------- next part --------------
=== modified file 'mysql-test/lib/My/ConfigFactory.pm'
--- a/mysql-test/lib/My/ConfigFactory.pm	2012-03-05 16:44:26 +0000
+++ b/mysql-test/lib/My/ConfigFactory.pm	2014-07-11 16:03:02 +0000
@@ -238,6 +238,9 @@
  { 'pid-file' => \&fix_pidfile },
  { '#host' => \&fix_host },
  { 'port' => \&fix_port },
+ # galera base_port and port used during SST
+ { '#galera_port' => \&fix_port },
+ { '#sst_port' => \&fix_port },
  { 'socket' => \&fix_socket },
  { '#log-error' => \&fix_log_error },
  { 'general-log' => 1 },

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2014-06-10 22:31:07 +0000
+++ b/mysql-test/mysql-test-run.pl	2014-07-11 16:03:02 +0000
@@ -4859,6 +4859,7 @@
      # Galera-related warnings.
      qr|WSREP:.*down context.*|,
      qr|WSREP: Failed to send state UUID:.*|,
+     qr|WSREP: wsrep_sst_receive_address.*|,
     );
 
   my $matched_lines= [];

=== modified file 'mysql-test/suite/galera/galera_2nodes.cnf'
--- a/mysql-test/suite/galera/galera_2nodes.cnf	2014-05-01 23:19:48 +0000
+++ b/mysql-test/suite/galera/galera_2nodes.cnf	2014-07-11 16:03:02 +0000
@@ -5,12 +5,15 @@
 binlog-format=row
 wsrep_provider=@ENV.WSREP_PROVIDER
 wsrep_cluster_address='gcomm://'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port'
+wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
 
 [mysqld.2]
 binlog-format=row
 wsrep_provider=@ENV.WSREP_PROVIDER
-wsrep_cluster_address='gcomm://127.0.0.1:4567'
-wsrep_provider_options='gmcast.listen_addr=tcp://127.0.0.1:4568'
+wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port'
+wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
 
 [ENV]
 NODE_MYPORT_1= @mysqld.1.port

=== added file 'mysql-test/suite/wsrep/my.cnf'
--- a/mysql-test/suite/wsrep/my.cnf	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/wsrep/my.cnf	2014-07-11 16:03:02 +0000
@@ -0,0 +1,8 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+
+[mysqld.1]
+
+[ENV]
+GALERA_BASE_PORT=@mysqld.1.#galera_port
+

=== modified file 'mysql-test/suite/wsrep/t/binlog_format.opt'
--- a/mysql-test/suite/wsrep/t/binlog_format.opt	2014-05-01 23:19:48 +0000
+++ b/mysql-test/suite/wsrep/t/binlog_format.opt	2014-07-11 16:03:02 +0000
@@ -1,1 +1,1 @@
---binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --log-bin
+--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_provider_options='base_port=$GALERA_BASE_PORT' --wsrep-on=1 --log-bin

=== modified file 'mysql-test/suite/wsrep/t/pool_of_threads.opt'
--- a/mysql-test/suite/wsrep/t/pool_of_threads.opt	2014-05-01 23:19:48 +0000
+++ b/mysql-test/suite/wsrep/t/pool_of_threads.opt	2014-07-11 16:03:02 +0000
@@ -1,1 +1,1 @@
---binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads
+--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_provider_options='base_port=$GALERA_BASE_PORT' --thread_handling=pool-of-threads

=== modified file 'mysql-test/suite/wsrep/t/variables.test'
--- a/mysql-test/suite/wsrep/t/variables.test	2014-07-09 15:04:28 +0000
+++ b/mysql-test/suite/wsrep/t/variables.test	2014-07-11 16:03:02 +0000
@@ -1,5 +1,11 @@
 --source include/have_wsrep.inc
 
+# Set galera's base_port so that test can run in parallel with other galera
+# tests.
+--disable_query_log
+eval SET GLOBAL wsrep_provider_options='base_port=$GALERA_BASE_PORT';
+--enable_query_log
+
 --echo
 --echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query
 --echo #



More information about the commits mailing list