Galera should pass --defaults-group-suffix to xtrabackup

Bug #1378355 reported by Philip Stoev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.6
Confirmed
Undecided
Unassigned

Bug Description

If the my.cnf file uses sections with different suffixes, like it is under MTR, xtrabackup SST will fail because xtrabackup will not be able to find the name of the datadir and assume the datadir is . , which is not the case.

To fix this, Galera should pass the value of @@defaults-group-suffix to the xtrabackup --defaults-group= parameter.

Note however that defaults-group-suffix is a single integer whereas xtrabackup --defaults-group expects the entire string "mysqld.1"

xtrabackup --defaults-file="/home/philips/git/codership-mysql/mysql-test/var/my.cnf" --defaults-group=mysqld.1 --backup --suspend-at-end --target-dir=/tmp/tmp.Em4XWrKmVU

Until this is fixed, it is not possible to test xtrabackup SST under MTR. There is no known workaround.

Revision history for this message
Hartmut Holzgraefe (hartmut-php) wrote :

Unfortunately there's no defaults-group-suffix variable, the parameter value is not exposed anywhere as far as I can tell ...

Revision history for this message
Hartmut Holzgraefe (hartmut-php) wrote :

Also while I don't know yet how MTR handles this, at least mysqld_multi doesn't use the --default-group or --default-group-suffix option at all, it reads the suffix-specific group sections itself and then creates the mysqld command line with explicit option settings from that

e.g. with a minimalistic my.cnf like this:

  [mysqld1]
  datadir=/home/ubuntu/mariadb/data1
  server-id=1

  [mysqld2]
  datadir=/home/ubuntu/mariadb/data2
  server-id=2
  port=3307

the mysqld processes started by "mysqld_multi start" get invoked like this:

  /usr/sbin/mysqld --datadir=/home/ubuntu/mariadb/data1 --server-id=1
  /usr/sbin/mysqld --datadir=/home/ubuntu/mariadb/data2 --server-id=2 --port=3307 --socket=/tmp/mysqld2.sock

So the active datadir should rather be supplied to xtrabackup explicitly directly, instead of relying on passing the correct option file and have it picked up from there?

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.