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

mariabackup ignores --plugin_dir command-line argument

    XMLWordPrintable

Details

    Description

      A user has a very interesting setup where mysqld runs inside of a chroot jail. Inside the chroot jail, their instance's plugin dir is located at /lib/plugin/, but outside the chroot jail, the actual full path of this directory is located at /usr/local/mariadb/mariadb_base/lib/plugin/.

      This user needed to use an encryption key manager plugin with mariabackup. The plugin is located in the system's plugin dir. mariabackup is running outside of the chroot jail, so this means it would be located at /usr/local/mariadb/mariadb_base/lib/plugin/. Therefore, when running the backup tool, the user provided the following argument:

      --plugin_dir=/usr/local/mariadb/mariadb_base/lib/plugin/

      Unfortunately, mariabackup ignored this parameter, and got plugin_dir from the server with the following statement:

      const char *QUERY_PLUGIN =
      "SELECT plugin_name, plugin_library, @@plugin_dir"
      " FROM information_schema.plugins WHERE plugin_type='ENCRYPTION'"
      " AND plugin_status='ACTIVE'";
      

      The value of @@plugin_dir captured by this statement is not valid outside of the chroot jail, so this resulted in a failed backup.

      Proposed solution:

      If --plugin_dir is supplied on the command-line, do not use the value received from the server.

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            0 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.