Merge lp:~akopytov/percona-xtrabackup/bug1250738-2.2 into lp:percona-xtrabackup/2.2

Proposed by Alexey Kopytov
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 4901
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1250738-2.2
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 153 lines (+33/-40)
6 files modified
xtrabackup/test/inc/common.sh (+16/-0)
xtrabackup/test/run.sh (+10/-1)
xtrabackup/test/t/bug1192347.sh (+1/-8)
xtrabackup/test/t/bug983720_galerainfo.sh (+2/-10)
xtrabackup/test/t/xb_galera_info.sh (+2/-10)
xtrabackup/test/t/xb_galera_sst.sh (+2/-11)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1250738-2.2
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+195010@code.launchpad.net

Description of the change

    Bug #1250738: Galera tests are skipped on some Jenkins slaves with
                  galera55 configuration

    The problem was that Galera tests checked for Galera support by starting
    temporary mysqld instances without specifying a configuration file. On
    some Jenkins slaves (e.g. Ubuntu ones in our cluster) there was a
    default configuration file at /etc/mysql/my.cnf which had query_cache
    enabled. Since query_cache is not supported by Galera, the server
    refused to start, so Galera support checks in tests assumed it there is
    no support and skipped the tests.

    Fixed by changing the way Galera support is being detected by the test
    suite. Instead of each tests having to roll its own check with a
    temporary mysqld instance, run.sh performs this check on startup by
    checking the wsrep_ready status variable (along with other
    version-specific variables). The value of that variable is then
    exported to subshells, so it is available to tests. As an extra safety,
    run.sh will also abort with an error, if Galera testing was explicitly
    requested via -c galera55.

http://jenkins.percona.com/view/XtraBackup/job/percona-xtrabackup-2.2-param/41/

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'xtrabackup/test/inc/common.sh'
--- xtrabackup/test/inc/common.sh 2013-11-07 12:23:43 +0000
+++ xtrabackup/test/inc/common.sh 2013-11-13 09:16:46 +0000
@@ -713,6 +713,22 @@
713}713}
714714
715########################################################################715########################################################################
716# Return 0 if the server has Galera support
717########################################################################
718function is_galera()
719{
720 [ -n "$WSREP_READY" ]
721}
722
723########################################################################
724# Skip the test if not running against a Galera-enabled server
725########################################################################
726function require_galera()
727{
728 is_galera || skip_test "Requires Galera support"
729}
730
731########################################################################
716# Skip the test if qpress binary is not available732# Skip the test if qpress binary is not available
717########################################################################733########################################################################
718function require_qpress()734function require_qpress()
719735
=== modified file 'xtrabackup/test/run.sh'
--- xtrabackup/test/run.sh 2013-09-23 05:21:56 +0000
+++ xtrabackup/test/run.sh 2013-11-13 09:16:46 +0000
@@ -379,6 +379,15 @@
379 INNODB_VERSION=${INNODB_VERSION#"innodb_version "}379 INNODB_VERSION=${INNODB_VERSION#"innodb_version "}
380 XTRADB_VERSION="`echo $INNODB_VERSION | sed 's/[0-9]\.[0-9]\.[0-9][0-9]*\(-[0-9][0-9]*\.[0-9][0-9]*\)*$/\1/'`"380 XTRADB_VERSION="`echo $INNODB_VERSION | sed 's/[0-9]\.[0-9]\.[0-9][0-9]*\(-[0-9][0-9]*\.[0-9][0-9]*\)*$/\1/'`"
381381
382 WSREP_READY=`$MYSQL ${MYSQL_ARGS} -Nsf -e "SHOW STATUS LIKE 'wsrep_ready'"`
383 WSREP_READY=${WSREP_READY#"wsrep_ready "}
384
385 if [ "$XB_BUILD" = "galera55" -a -z "$WSREP_READY" ]
386 then
387 die "Galera configuration is enabled via -c galera55, but the server \
388doesn't have Galera support."
389 fi
390
382 # Version-specific defaults391 # Version-specific defaults
383 DEFAULT_IBDATA_SIZE="10M"392 DEFAULT_IBDATA_SIZE="10M"
384393
@@ -455,7 +464,7 @@
455 export MYSQL_VERSION MYSQL_VERSION_COMMENT MYSQL_FLAVOR \464 export MYSQL_VERSION MYSQL_VERSION_COMMENT MYSQL_FLAVOR \
456 INNODB_VERSION XTRADB_VERSION INNODB_FLAVOR \465 INNODB_VERSION XTRADB_VERSION INNODB_FLAVOR \
457 XB_BIN IB_BIN IB_ARGS XB_ARGS MYSQLD_EXTRA_ARGS \466 XB_BIN IB_BIN IB_ARGS XB_ARGS MYSQLD_EXTRA_ARGS \
458 DEFAULT_IBDATA_SIZE XB_BUILD467 DEFAULT_IBDATA_SIZE XB_BUILD WSREP_READY
459}468}
460469
461###########################################################################470###########################################################################
462471
=== modified file 'xtrabackup/test/t/bug1192347.sh'
--- xtrabackup/test/t/bug1192347.sh 2013-07-25 15:04:49 +0000
+++ xtrabackup/test/t/bug1192347.sh 2013-11-13 09:16:46 +0000
@@ -5,14 +5,7 @@
55
6. inc/common.sh6. inc/common.sh
77
8set +e8is_galera && skip_test "Requires a server without Galera support"
9${MYSQLD} --basedir=$MYSQL_BASEDIR --user=$USER --help --verbose --wsrep-sst-method=rsync| grep -q wsrep
10probe_result=$?
11if [[ "$probe_result" == "0" ]]
12then
13 skip_test "Server supports wsrep"
14fi
15set -e
169
17start_server10start_server
1811
1912
=== modified file 'xtrabackup/test/t/bug983720_galerainfo.sh'
--- xtrabackup/test/t/bug983720_galerainfo.sh 2013-08-28 11:52:26 +0000
+++ xtrabackup/test/t/bug983720_galerainfo.sh 2013-11-13 09:16:46 +0000
@@ -4,17 +4,9 @@
44
5. inc/common.sh5. inc/common.sh
66
7require_galera
8
7ADDR=127.0.0.19ADDR=127.0.0.1
8set +e
9${MYSQLD} --basedir=$MYSQL_BASEDIR --user=$USER --help --verbose --wsrep-sst-method=rsync| grep -q wsrep
10probe_result=$?
11if [[ "$probe_result" == "0" ]]
12 then
13 vlog "Server supports wsrep"
14 else
15 skip_test "Requires WSREP enabled"
16fi
17set -e
1810
19debug=""11debug=""
20pdebug=""12pdebug=""
2113
=== modified file 'xtrabackup/test/t/xb_galera_info.sh'
--- xtrabackup/test/t/xb_galera_info.sh 2013-08-28 11:52:26 +0000
+++ xtrabackup/test/t/xb_galera_info.sh 2013-11-13 09:16:46 +0000
@@ -1,16 +1,8 @@
1. inc/common.sh1. inc/common.sh
22
3require_galera
4
3ADDR=127.0.0.15ADDR=127.0.0.1
4set +e
5${MYSQLD} --basedir=$MYSQL_BASEDIR --user=$USER --help --verbose --wsrep-sst-method=rsync| grep -q wsrep
6probe_result=$?
7if [[ "$probe_result" == "0" ]]
8 then
9 vlog "Server supports wsrep"
10 else
11 skip_test "Requires WSREP enabled"
12fi
13set -e
146
15if [[ -n ${WSREP_DEBUG:-} ]];then 7if [[ -n ${WSREP_DEBUG:-} ]];then
16 start_server --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib/libgalera_smm.so --wsrep_cluster_address=gcomm:// --wsrep-debug=1 --wsrep_provider_options="debug=1" --wsrep_node_address=$ADDR8 start_server --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib/libgalera_smm.so --wsrep_cluster_address=gcomm:// --wsrep-debug=1 --wsrep_provider_options="debug=1" --wsrep_node_address=$ADDR
179
=== modified file 'xtrabackup/test/t/xb_galera_sst.sh'
--- xtrabackup/test/t/xb_galera_sst.sh 2013-08-28 11:52:26 +0000
+++ xtrabackup/test/t/xb_galera_sst.sh 2013-11-13 09:16:46 +0000
@@ -4,6 +4,8 @@
44
5. inc/common.sh5. inc/common.sh
66
7require_galera
8
7node1=19node1=1
8# node2 will be getting SST10# node2 will be getting SST
9node2=90111node2=901
@@ -12,17 +14,6 @@
12SUSER="root"14SUSER="root"
13SMDSUM="9f6f3edb78f9a5957ecaf8f99953b5af"15SMDSUM="9f6f3edb78f9a5957ecaf8f99953b5af"
1416
15set +e
16${MYSQLD} --basedir=$MYSQL_BASEDIR --help --verbose --wsrep-sst-method=rsync| grep -q wsrep
17probe_result=$?
18if [[ "$probe_result" == "0" ]]
19 then
20 vlog "Server supports wsrep"
21 else
22 skip_test "Requires WSREP enabled"
23fi
24set -e
25
26debug=""17debug=""
27pdebug=""18pdebug=""
28if [[ -n ${WSREP_DEBUG:-} ]];then 19if [[ -n ${WSREP_DEBUG:-} ]];then

Subscribers

People subscribed via source and target branches

to all changes: