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

Extra engines enabled through additional config are not loaded on first installation

Details

    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

      Attachments

        Issue Links

          Activity

            serg Sergei Golubchik added a comment - - edited

            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.

            serg Sergei Golubchik added a comment - - edited 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.

            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.

            serg Sergei Golubchik added a comment - 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.

            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.

            serg Sergei Golubchik added a comment - 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.
            serg Sergei Golubchik added a comment - - edited

            Fixed in DEB packages: 10.2.17, 10.3.8

            serg Sergei Golubchik added a comment - - edited Fixed in DEB packages: 10.2.17, 10.3.8

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

            serg Sergei Golubchik added a comment - Fixed in RPM too, but differently — using posttrans scriptlets to make sure the server is restarted only once.

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.