Merge lp:~raghavendra-prabhu/percona-xtrabackup/Bug-1182995 into lp:percona-xtrabackup/2.1

Proposed by Raghavendra D Prabhu
Status: Rejected
Rejected by: Alexey Kopytov
Proposed branch: lp:~raghavendra-prabhu/percona-xtrabackup/Bug-1182995
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 103 lines (+65/-2)
4 files modified
test/inc/common.sh (+7/-1)
test/t/xb_galera_info.sh (+3/-0)
test/t/xb_galera_sst.sh (+54/-0)
test/testrun.sh (+1/-1)
To merge this branch: bzr merge lp:~raghavendra-prabhu/percona-xtrabackup/Bug-1182995
Reviewer Review Type Date Requested Status
Stewart Smith (community) Needs Fixing
George Ormond Lorch III (community) Needs Fixing
Review via email: mp+165205@code.launchpad.net
To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) wrote :

raghu,
This needs to be first implemented in the XB 2.0 suite, then merged into the 2.1 suite, then one branch merge proposal for each version. For example:
in xb-2.0-bug1182995:
bzr commit -m "..."
bzr push ~raghavendra-prabhu/percona-xtrabackup/2.0-bug1182995

Then in xb-2.1-bug1182995:
bzr merge ../xb-2.0-bug1182995
test here and maybe do a bzr diff to make sure everything looks good, if not, do a bzr revert, make changes manually, then
bzr push ~raghavendra-prabhu/percona-xtrabackup/2.1-bug1182995

Then make merge proposal for each of the branches.

review: Needs Fixing
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Raghu,

Also you might want to use get_free_port function instead of hardcoded port numbers (as done in bug983720_galerainfo.sh). Fixed port numbers will cause port conflicts in Jenkins which will lead to failures. Also, there should be a Jenkins build for this merge proposal, both for 2.0 and 2.1.

Revision history for this message
Stewart Smith (stewart) wrote :

- We cannot use hard coded port numbers, it will cause failures.
- the following line looks suspicious, will it actually work on 32bit?
  grep -q lib64 && GPREFIX="${MYSQL_BASEDIR}/lib64/libgalera_smm.so"
- the existing code for galera things I think should be adequate for finding libs in the right places? So we should be able to just reuse that code.
- why is sbin needed for this test and no others?

review: Needs Fixing
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

@George,

Yes, will do.

@Sergei,

Ack, that should help. I will use that.

@Stewart,

a)
On 32 bit, I presume it is /usr/lib/libgalera_smm.so? The default
is /usr/lib/libgalera_smm.so. The default failed for me on
64 bit CentOS6 - How was the other test - xb_galera_info - running before? - it would have failed.

b)
Is it /usr/lib32 on 32 bit systems?

c)
sbin is not specific to this test. The tests in
percona-xtrabackup-test package fail since the basedir is /usr
and the find_program looks for mysqld in /usr/bin and
/usr/libexec but not /usr/sbin.

I will file a separate bug for this.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

I will file a separate bug for "grep -q lib64 && GPREFIX="${MYSQL_BASEDIR}/lib64/libgalera_smm.so" part" since I see other tests where prefix is wrong.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

The 2.0 and 2.1 branches are not consistent with each other: http://paste.wnohang.net/94f2c9?diff

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Closing as the patch will be handled in other MPs.

Unmerged revisions

608. By Raghavendra D Prabhu

Bug#1182995: Testcase for Xtrabackup for PXC SST.

This commit adds a test case for Xtrabackup involving SST Basically, .
it starts two servers, does a Xtrabackup SST between them and finally .
checks for galera co-ordinates in the xtrabackup_galera_info file and .
matches it with that in the server .

Few other things fixed include:

a) Correct prefix for galera library.

b) Added a special condition to common.sh to avoid mysql_install_db.

607. By Raghavendra D Prabhu

Fix testrun.sh to include for /usr BASEDIR and mysqld in /usr/sbin/

606. By <email address hidden>

Merge lp:~hrvojem/percona-xtrabackup/rn-2.1.3

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'test/inc/common.sh'
2--- test/inc/common.sh 2013-05-07 13:32:47 +0000
3+++ test/inc/common.sh 2013-05-22 17:31:28 +0000
4@@ -290,7 +290,13 @@
5 then
6 vlog "Creating server data directory: $MYSQLD_DATADIR"
7 mkdir -p "$MYSQLD_DATADIR"
8- call_mysql_install_db
9+
10+ # Reserve 900 series for SST nodes
11+ if [[ $id -lt 900 ]];then
12+ call_mysql_install_db
13+ else
14+ vlog "Skiping mysql_install_db for SST"
15+ fi
16 fi
17
18 # Start the server
19
20=== modified file 'test/t/xb_galera_info.sh'
21--- test/t/xb_galera_info.sh 2012-09-21 00:43:03 +0000
22+++ test/t/xb_galera_info.sh 2013-05-22 17:31:28 +0000
23@@ -1,5 +1,8 @@
24 . inc/common.sh
25
26+GPREFIX="${MYSQL_BASEDIR}/lib/libgalera_smm.so"
27+mysql_config --libs | grep -q lib64 && GPREFIX="${MYSQL_BASEDIR}/lib64/libgalera_smm.so"
28+
29 set +e
30 ${MYSQLD} --basedir=$MYSQL_BASEDIR --user=$USER --help --verbose --wsrep-sst-method=rsync| grep -q wsrep
31 probe_result=$?
32
33=== added file 'test/t/xb_galera_sst.sh'
34--- test/t/xb_galera_sst.sh 1970-01-01 00:00:00 +0000
35+++ test/t/xb_galera_sst.sh 2013-05-22 17:31:28 +0000
36@@ -0,0 +1,54 @@
37+. inc/common.sh
38+
39+node1=1
40+node2=901
41+PORT1=4000
42+PORT2=5000
43+ADDR=127.0.0.1
44+SSTPASS="password"
45+GPREFIX="${MYSQL_BASEDIR}/lib/libgalera_smm.so"
46+
47+mysql_config --libs | grep -q lib64 && GPREFIX="${MYSQL_BASEDIR}/lib64/libgalera_smm.so"
48+
49+set +e
50+${MYSQLD} --basedir=$MYSQL_BASEDIR --user=$USER --help --verbose --wsrep-sst-method=rsync| grep -q wsrep
51+probe_result=$?
52+if [[ "$probe_result" == "0" ]]
53+ then
54+ vlog "Server supports wsrep"
55+ else
56+ echo "Requires WSREP enabled" > $SKIPPED_REASON
57+ exit $SKIPPED_EXIT_CODE
58+fi
59+set -e
60+
61+vlog "Starting server $node1"
62+start_server_with_id $node1 --port=$(( PORT1+5 )) --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib64/libgalera_smm.so --wsrep_cluster_address=gcomm:// --wsrep_sst_receive_address=$ADDR:$PORT1 --wsrep_node_incoming_address=$ADDR --wsrep_provider_options="gmcast.listen_addr=tcp://$ADDR:$(( PORT1+10 ))" --wsrep_sst_method=xtrabackup --wsrep_sst_auth=$USER:$SSTPASS
63+
64+vlog "Setting password to 'password'"
65+run_cmd ${MYSQL} ${MYSQL_ARGS} <<EOF
66+ SET PASSWORD FOR 'root'@'localhost' = PASSWORD('password');
67+EOF
68+
69+vlog "Starting server $node2"
70+start_server_with_id $node2 --port=$(( PORT2+5 )) --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib64/libgalera_smm.so --wsrep_cluster_address=gcomm://$ADDR:$(( PORT1+10 )) --wsrep_sst_receive_address=$ADDR:$PORT2 --wsrep_node_incoming_address=$ADDR --wsrep_provider_options="gmcast.listen_addr=tcp://$ADDR:$(( PORT2+10 ))" --wsrep_sst_auth=$USER:$SSTPASS --wsrep_sst_method=xtrabackup
71+
72+vlog "Sleeping while SST for 10 seconds"
73+sleep 10
74+
75+switch_server $node2
76+
77+# The password propagates through SST
78+MYSQL_ARGS="${MYSQL_ARGS} -ppassword"
79+
80+
81+if [[ "`${MYSQL} ${MYSQL_ARGS} -Ns -e 'SHOW STATUS LIKE "wsrep_local_state_uuid"'|awk {'print $2'}`" == "`sed -re 's/:.+$//' $MYSQLD_DATADIR/xtrabackup_galera_info`" && "`${MYSQL} ${MYSQL_ARGS} -Ns -e 'SHOW STATUS LIKE "wsrep_last_committed"'|awk {'print $2'}`" == "`sed -re 's/^.+://' $MYSQLD_DATADIR/xtrabackup_galera_info`" ]]
82+then
83+ vlog "SST successful"
84+else
85+ vlog "SST failed"
86+ exit 1
87+fi
88+
89+stop_server_with_id $node2
90+stop_server_with_id $node1
91
92=== modified file 'test/testrun.sh'
93--- test/testrun.sh 2013-05-17 11:07:26 +0000
94+++ test/testrun.sh 2013-05-22 17:31:28 +0000
95@@ -67,7 +67,7 @@
96
97 find_program MYSQL_INSTALL_DB mysql_install_db $MYSQL_BASEDIR/bin \
98 $MYSQL_BASEDIR/scripts
99- find_program MYSQLD mysqld $MYSQL_BASEDIR/bin/ $MYSQL_BASEDIR/libexec
100+ find_program MYSQLD mysqld $MYSQL_BASEDIR/bin/ $MYSQL_BASEDIR/libexec $MYSQL_BASEDIR/sbin
101 find_program MYSQL mysql $MYSQL_BASEDIR/bin
102 find_program MYSQLADMIN mysqladmin $MYSQL_BASEDIR/bin
103 find_program MYSQLDUMP mysqldump $MYSQL_BASEDIR/bin

Subscribers

People subscribed via source and target branches