Percona XtraDB Cluster - HA scalable solution for MySQL

rsync SST filter may include lost+found directory

Reported by Alex Yurchenko on 2013-03-12
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Medium
Alex Yurchenko
Percona XtraDB Cluster
Undecided
Unassigned

Bug Description

Normally this will result in SST failure due to insufficient privileges, and even if it does not, we simply don't want to rsync lost+found.

User reports:

We have a galera 3 node cluster test installation on
CentOS release 6.3
MySQL-server-5.5.28_wsrep_23.7-1.rhel5.x86_64
wsrep_sst_method=rsync

As I tried to setup a crashed node with SST, I got an rsync error and the SST failed with errors:
130312 11:55:39 [Note] WSREP: Tables flushed.
rsync: opendir "/var/lib/mysql/lost+found" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]
rsync returned code 23:

So I changed /usr/bin/wsrep_sst_rsync
and added rsync --exclude=lost+found/

After that, SST with rsync worked fine.

Changed in codership-mysql:
assignee: nobody → Alex Yurchenko (ayurchen)
importance: Undecided → Medium
milestone: none → 5.5.30-23.7.4
status: New → Confirmed
Alex Yurchenko (ayurchen) wrote :

committed fix in r3855

Changed in codership-mysql:
status: Confirmed → Fix Committed
Changed in percona-xtradb-cluster:
milestone: none → 5.5.30-23.7.4
status: New → Fix Released
Changed in codership-mysql:
status: Fix Committed → Fix Released
Guillaume Lefranc (tanj) wrote :

Hello, the bug was probably reintroduced as a regression due to the new parallelization code, at line 161:

 find . -maxdepth 1 -mindepth 1 -type d -print0 | xargs -I{} -0 -P $count \
             rsync --owner --group --perms --links --specials \
             --ignore-times --inplace --recursive --delete --quiet \
             $WHOLE_FILE_OPT --exclude '*/ib_logfile*' "$WSREP_SST_OPT_DATA"/{}/ \
             rsync://$WSREP_SST_OPT_ADDR/{} >&2 || RC=$?

causes the following errors:

rsync: change_dir "/var/lib/mysql//./lost+found" failed: Permission denied (13)
rsync: change_dir#1 "lost+found" (in rsync_sst) failed: Permission denied (13)

A quick fix would be to change the first line by:

 find . -maxdepth 1 -mindepth 1 -type d ! -name "lost+found" -print0

Thanks!
T

Alex Yurchenko (ayurchen) wrote :

Guillaume, submitted https://bugs.launchpad.net/codership-mysql/5.6/+bug/1299394 about that. Thanks for figuring this out!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers