[MDEV-13400] mariabackup ignores --plugin_dir command-line argument Created: 2017-07-28  Updated: 2020-08-25  Resolved: 2017-09-12

Status: Closed
Project: MariaDB Server
Component/s: Backup, Plugins
Affects Version/s: 10.1.25
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Vladislav Vaintroub
Resolution: Won't Fix Votes: 0
Labels: backup, encryption, mariabackup


 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.



 Comments   
Comment by Vladislav Vaintroub [ 2017-09-12 ]

It does not ignore --plugin-dir anymore. --plugin-dir is intepreted as directory for the client-side plugins. We do not support that kind of virtualization (chroot), this seems to be a very specific uncommon environment.

Generated at Thu Feb 08 08:05:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.