[MDEV-7979] file_key_management plugin is not installable at runtime Created: 2015-04-11  Updated: 2015-10-07  Resolved: 2015-04-11

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

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-8262 file_key_management plugin install error Closed
relates to MDEV-8914 Provide better error message if file-... Closed

 Description   

I don't see how to install file_key_management plugin at runtime.
The plugin init requires file_key_management_filename variable to be set, and to set the variable one needs the plugin.
The part about file_key_management_filename being mandatory is documented, so I assume the whole thing is intentional. However, it would be nice to produce a better error message. Now it looks like this:

MariaDB [test]> install soname 'file_key_management';
ERROR 29 (HY000): File '' not found (Errcode: 2 "No such file or directory")

and the error log says

150411 19:28:06 [ERROR] Plugin 'file_key_management' init function returned error.
150411 19:28:06 [ERROR] Plugin 'file_key_management' registration as a ENCRYPTION failed.

Both are not very helpful.
Probably the best would be to say that the plugin cannot be installed at runtime, but I don't know if it's possible.
Also, if it's not installable at runtime, it should be documented.



 Comments   
Comment by Sergei Golubchik [ 2015-04-11 ]

A plugin can perfectly well be installed at run-time. You either add --loose-file-key-management-filename to my.cnf before you started the server (note the loose- prefix). Or you add --file-key-management-filename to my.cnf after the server is started. Then you can install the plugin just fine.

Comment by Elena Stepanova [ 2015-04-11 ]

Okay, thanks.
The error code and message is still pretty useless, though.

Comment by Hartmut Holzgraefe [ 2015-10-07 ]

How would adding --file-key-management-filename to my.cnf after starting the server help with installing the plugin? The variable would still be unset in the running server then, and the plugin will refuse to load ...

Comment by Sergei Golubchik [ 2015-10-07 ]

Plugin reads my.cnf and picks up its options, even if loaded at run-time.

Generated at Thu Feb 08 07:23:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.