Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13969

sst mysqldump and xtrabackup-v2 handle WSREP_SST_OPT_CONF incorrectly

Details

    • 10.2.10, 10.1.30

    Description

      Could not open required defaults file: /home/a/mariadb-environs/m1-system2/dt/--defaults-file=/home/a/mariadb-environs/m1-system2/my.cnf
      Fatal error in defaults handling. Program aborted
      2017-09-30 13:54:05 140004965337856 [ERROR] WSREP: Process completed with error: wsrep_sst_mysqldump --address '192.168.1.183:3308' --port '3308' --local-port '3307' --socket '/home/a/mariadb-environs/m1-system2/dt/my.sock'  --defaults-file '/home/a/mariadb-environs/m1-system2/my.cnf'  --gtid '9587a0be-a5b0-11e7-ab7b-2b5aa1592648:0' --gtid-domain-id '0': 1 (Operation not permitted)
      

      Attachments

        Issue Links

          Activity

            anikitin Andrii Nikitin (Inactive) added a comment - - edited

            Note that wsrep_sst_xtrabackup doesn't have --defaults-file keyword when using WSREP_SST_OPT_CONF (defined by wsrep_sst_common) :

            INNOAPPLY="${INNOBACKUPEX_BIN} ${WSREP_SST_OPT_CONF} --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log"
            

            While wsrep_sst_mysqldump still uses it with --defaults-file :

            MYSQL="$MYSQL_CLIENT --defaults-extra-file=$WSREP_SST_OPT_CONF "\
            

            anikitin Andrii Nikitin (Inactive) added a comment - - edited Note that wsrep_sst_xtrabackup doesn't have --defaults-file keyword when using WSREP_SST_OPT_CONF (defined by wsrep_sst_common) : INNOAPPLY= "${INNOBACKUPEX_BIN} ${WSREP_SST_OPT_CONF} --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log" While wsrep_sst_mysqldump still uses it with --defaults-file : MYSQL= "$MYSQL_CLIENT --defaults-extra-file=$WSREP_SST_OPT_CONF " \

            It looks 10.2 is affected as well, just it doesn't pass --defaults-file parameter by default, so the error is harder to trigger.

            anikitin Andrii Nikitin (Inactive) added a comment - It looks 10.2 is affected as well, just it doesn't pass --defaults-file parameter by default, so the error is harder to trigger.

            pull request #457 seems related

            serg Sergei Golubchik added a comment - pull request #457 seems related

            Oh I also missed that INNOMOVE also has --defaults-file in wsrep_sst_xtrabackup-v2 , which results in error in 10.1.28:

            + eval 'innobackupex --defaults-file=--defaults-file=/home/a/env1/m2-10.1.28/my.cnf   --defaults-group=mysqld --no-version-check  --datadir=/home/a/env1/m2-10.1.28/dt/ --move-back --force-non-empty-directories ${DATA} &>${DATA}/innobackup.move.log'
            

            And then in log:

            Could not open required defaults file: /home/a/env1/m2-10.1.28/dt/--defaults-file=/home/a/env1/m2-10.1.28/my.cnf
            

            so it must be fixed as well (or is it wsrep_sst_common which passes that incorrectly?)

            anikitin Andrii Nikitin (Inactive) added a comment - Oh I also missed that INNOMOVE also has --defaults-file in wsrep_sst_xtrabackup-v2 , which results in error in 10.1.28: + eval 'innobackupex --defaults-file=--defaults-file=/home/a/env1/m2-10.1.28/my.cnf --defaults-group=mysqld --no-version-check --datadir=/home/a/env1/m2-10.1.28/dt/ --move-back --force-non-empty-directories ${DATA} &>${DATA}/innobackup.move.log' And then in log: Could not open required defaults file: /home/a/env1/m2-10.1.28/dt/--defaults-file=/home/a/env1/m2-10.1.28/my.cnf so it must be fixed as well (or is it wsrep_sst_common which passes that incorrectly?)
            spikestabber Brendan P added a comment -

            Hi all, can we please have this fixed for 10.1.30 as well? Thank you.

            spikestabber Brendan P added a comment - Hi all, can we please have this fixed for 10.1.30 as well? Thank you.

            Confirmed that current 10.1 is affected (build 17290) in this line https://github.com/MariaDB/server/blob/40756c9151a564b57f351111d7486b4d18ef5e39/scripts/wsrep_sst_xtrabackup-v2.sh#L868
            E.g. test test galera_sst_xtrabackup-v2_encrypt_with_key show invalid value for the parameter:

            Evaluating innobackupex --defaults-file=--defaults-file=/home/a/env3/mariadb-environs/_depot/m-tar/10.1-17290/mysql-test/var/my.cnf
            

            both 5.5-galera and 10.0-galera are not affected. I am re-opening this ticket and let serg decide whether it may be re-closed and needs another ticket.

            anikitin Andrii Nikitin (Inactive) added a comment - Confirmed that current 10.1 is affected (build 17290) in this line https://github.com/MariaDB/server/blob/40756c9151a564b57f351111d7486b4d18ef5e39/scripts/wsrep_sst_xtrabackup-v2.sh#L868 E.g. test test galera_sst_xtrabackup-v2_encrypt_with_key show invalid value for the parameter: Evaluating innobackupex --defaults-file=--defaults-file=/home/a/env3/mariadb-environs/_depot/m-tar/10.1-17290/mysql-test/var/my.cnf both 5.5-galera and 10.0-galera are not affected. I am re-opening this ticket and let serg decide whether it may be re-closed and needs another ticket.

            People

              serg Sergei Golubchik
              anikitin Andrii Nikitin (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.