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

Galera SST innobackupex-move ignores Environment settings

Details

    Description

      We use mariadb galera managed by systemd on Ubuntu 18.04. There is datadir set to environment in systemd config:

      Environment='MYSQLD_MULTI_INSTANCE=--defaults-file=/etc/mysql/mariadb-%I.cnf \
                                         --pid-file=/var/run/mariadb-%I/mariadb.pid \
                                         --port=%I \
                                         --socket=/var/run/mariadb-%I/mariadb.sock \
                                         --datadir=/var/lib/mariadb-%I \
                                         --tmpdir=/run/mariadb-%I'
      

      I've needed to add one server into cluster but it keep failing. I've check logs and found this line:

      necy1 -innobackupex-move: [00] 2021-02-23 17:08:48 Error: Move file ibdata1 to /var/lib/mysql/ibdata1 failed: Destination file exists

      This is default datadir, which we don't use. innobackupex-move seems to ignore environment settings. After adding datadir into mariadb config file innobackupex-move and whole process succeded.

      wsrep_sst_method is set to mariabackup

      I've added systemd config file for mariadb service.

      Attachments

        Issue Links

          Activity

            it's not about the environment, MYSQLD_MULTI_INSTANCE is only used to set the datadir for the server, the server invokes sst scripts, but wsrep_sst_mariabackup incorrectly invokes mariabackup, so it seems. It does

            INNOMOVE="${INNOBACKUPEX_BIN} ${WSREP_SST_OPT_CONF} --move-back $disver $impts --force-non-empty-directories --target-dir=\${DATA}
            

            where $DATA is datadir, and --datadir is not set (so, gets the default value that shows up in the logs)

            serg Sergei Golubchik added a comment - it's not about the environment, MYSQLD_MULTI_INSTANCE is only used to set the datadir for the server, the server invokes sst scripts, but wsrep_sst_mariabackup incorrectly invokes mariabackup, so it seems. It does INNOMOVE="${INNOBACKUPEX_BIN} ${WSREP_SST_OPT_CONF} --move-back $disver $impts --force-non-empty-directories --target-dir=\${DATA} where $DATA is datadir, and --datadir is not set (so, gets the default value that shows up in the logs)

            Reassigning to Galera, again.
            And jplindst, it would also be about the time to move from innobackupex to mariabackup

            wlad Vladislav Vaintroub added a comment - Reassigning to Galera, again. And jplindst , it would also be about the time to move from innobackupex to mariabackup

            Buildbot is not yet happy, there is red lines on mariabackup sst test case. Did you try Ramesh QA script ?

            jplindst Jan Lindström (Inactive) added a comment - Buildbot is not yet happy, there is red lines on mariabackup sst test case. Did you try Ramesh QA script ?

            ok to push after adding support for other groups in my.cnf for ssl/tls parameters.

            jplindst Jan Lindström (Inactive) added a comment - ok to push after adding support for other groups in my.cnf for ssl/tls parameters.

            The problems have been fixed. Further work on improving the scripts and fixing other errors in them has been moved to MDEV-23580.

            sysprg Julius Goryavsky added a comment - The problems have been fixed. Further work on improving the scripts and fixing other errors in them has been moved to MDEV-23580 .

            Resolving the merge conflicts from 10.2 to 10.3 is not trivial. Please fix.

            marko Marko Mäkelä added a comment - Resolving the merge conflicts from 10.2 to 10.3 is not trivial. Please fix.

            People

              sysprg Julius Goryavsky
              PavelCibulka Pavel Cibulka
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.