[MDEV-14560] Extra engines enabled through additional config are not loaded on first installation Created: 2017-12-03  Updated: 2020-06-30  Resolved: 2018-09-21

Status: Closed
Project: MariaDB Server
Component/s: Configuration, Packaging, Platform Debian, Platform RedHat
Affects Version/s: 10.2
Fix Version/s: 10.2.18, 10.3.10

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-16893 TokuDB doesn't start after installati... Stalled
Duplicate
duplicates MDEV-14671 Minor upgrade of all packages on zypp... Closed
Relates
relates to MDEV-23061 Extra engines enabled through config ... Stalled

 Description   

We have some engines which are installed from separate packages. When it happens, they also install additional configs with plugin-load-add=ha_engine options.

However, upon initial installation apparently these config files are created after the server is started; so, upon first automatic startup after installation the server still does not have them, which seems confusing. I suppose it needs to be fixed somehow.

I've set the affected version to 10.2 because that's where I encountered it, but probably other ones are also affected.

To reproduce:

  • enable MariaDB repo, e.g. 10.2
  • run apt-get install mariadb-server mariadb-plugin-rocksdb
  • check that the server is running, but it doesn't have RocksDB
  • restart the server – now RocksDB is there


 Comments   
Comment by Sergei Golubchik [ 2017-12-04 ]

One option would be to get rid of plugin-load-add=ha_engine config files and run mysql -e 'INSTALL SONAME "ha_engine" instead.

This is something we cannot do in rpms yet, because it needs a valid superuser account in MariaDB, but debian always used to have it via the deb-maint-user or a unix_socket plugin.

Comment by Sergei Golubchik [ 2018-06-24 ]

The drawback of the above is that requires a running mysqld.

In particular, mroonga uses this approach. INSTALL PLUGIN in post-install script, UNINSTALL PLUGIN in pre-rm script.

It works for installations, but during big upgrades on Debian (server and mroonga together) pre-rm fails, because the server happens to be down when mroonga's pre-rm is run.

Comment by Sergei Golubchik [ 2018-06-24 ]

For now I'll make Debian to restart the server automatically when a plugin is installed. The mariadb-server package will install a trigger that will reload systemd config and restart mysqld whenever anything under /etc/mysq/ or /etc/systemd/system/mariadb.service.d/ changes.

Plugins that don't install new .cnf files (like mroonga) won't trigger a restart, plugins that do (like rocksdb) will.

Comment by Sergei Golubchik [ 2018-07-02 ]

Fixed in DEB packages: 10.2.17, 10.3.8

Comment by Sergei Golubchik [ 2018-10-12 ]

Fixed in RPM too, but differently — using posttrans scriptlets to make sure the server is restarted only once.

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