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

Extra engines enabled through config are not loaded after initial installation (#2)

Details

    Description

      It appears that the fix made for MDEV-14560 disappeared in 10.5, probably after recent changes in configuration. Same scenario as in MDEV-14560:

      • on a clean machine, run

        apt-get install mariadb-server mariadb-plugin-rocksdb
        

      • after installation, the server gets started automatically as usual, but RocksDB isn't there.

      Server restart makes it appear.

      On 10.4 it works normally, the engine is there right away, unless of course the system is affected by MDEV-19933

      Attachments

        Issue Links

          Activity

            I confirm this issue is present in 10.5.4:

            $ vagrant up
            $ vagrant ssh
            Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-108-generic x86_64)
             
            curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
            echo 'deb  http://mirror.one.com/mariadb/repo/10.5/ubuntu bionic main' > /etc/apt/sources.list.d/mariadb.list
            apt-get update
            apt-get install mariadb-server mariadb-plugin-rocksdb
             
            root@ubuntu-bionic:~# mysql -uroot -prootpass --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins" | sort > after-install
            root@ubuntu-bionic:~# systemctl restart mariadb
            root@ubuntu-bionic:~# mysql -uroot -prootpass --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins" | sort > after-restart
            root@ubuntu-bionic:~# diff -u after-install after-restart 
            --- after-install	2020-07-01 06:23:48.138996353 +0000
            +++ after-restart	2020-07-01 06:24:00.313080360 +0000
            @@ -51,20 +51,20 @@
             QUERY_CACHE_INFO	NOT INSTALLED	INFORMATION SCHEMA	query_cache_info.so	BSD
             QUERY_RESPONSE_TIME	NOT INSTALLED	INFORMATION SCHEMA	query_response_time.so	GPL
             QUERY_RESPONSE_TIME_AUDIT	NOT INSTALLED	AUDIT	query_response_time.so	GPL
            -ROCKSDB	NOT INSTALLED	STORAGE ENGINE	ha_rocksdb.so	GPL
            -ROCKSDB_CFSTATS	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_CF_OPTIONS	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_COMPACTION_STATS	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_DBSTATS	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_DDL	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_DEADLOCK	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_GLOBAL_INFO	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_INDEX_FILE_MAP	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_LOCKS	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_PERF_CONTEXT	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_PERF_CONTEXT_GLOBAL	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_SST_PROPS	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            -ROCKSDB_TRX	NOT INSTALLED	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB	ACTIVE	STORAGE ENGINE	ha_rocksdb.so	GPL
            +ROCKSDB_CFSTATS	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_CF_OPTIONS	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_COMPACTION_STATS	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_DBSTATS	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_DDL	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_DEADLOCK	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_GLOBAL_INFO	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_INDEX_FILE_MAP	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_LOCKS	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_PERF_CONTEXT	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_PERF_CONTEXT_GLOBAL	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_SST_PROPS	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
            +ROCKSDB_TRX	ACTIVE	INFORMATION SCHEMA	ha_rocksdb.so	GPL
             SEQUENCE	ACTIVE	STORAGE ENGINE	NULL	GPL
             SERVER_AUDIT	NOT INSTALLED	AUDIT	server_audit.so	GPL
             SPATIAL_REF_SYS	ACTIVE	INFORMATION SCHEMA	NULL	GPL
            

            I will look into this.

            otto Otto Kekäläinen added a comment - I confirm this issue is present in 10.5.4: $ vagrant up $ vagrant ssh Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-108-generic x86_64)   curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc echo 'deb http://mirror.one.com/mariadb/repo/10.5/ubuntu bionic main' > /etc/apt/sources.list.d/mariadb.list apt-get update apt-get install mariadb-server mariadb-plugin-rocksdb   root@ubuntu-bionic:~# mysql -uroot -prootpass --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins" | sort > after-install root@ubuntu-bionic:~# systemctl restart mariadb root@ubuntu-bionic:~# mysql -uroot -prootpass --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins" | sort > after-restart root@ubuntu-bionic:~# diff -u after-install after-restart --- after-install 2020-07-01 06:23:48.138996353 +0000 +++ after-restart 2020-07-01 06:24:00.313080360 +0000 @@ -51,20 +51,20 @@ QUERY_CACHE_INFO NOT INSTALLED INFORMATION SCHEMA query_cache_info.so BSD QUERY_RESPONSE_TIME NOT INSTALLED INFORMATION SCHEMA query_response_time.so GPL QUERY_RESPONSE_TIME_AUDIT NOT INSTALLED AUDIT query_response_time.so GPL -ROCKSDB NOT INSTALLED STORAGE ENGINE ha_rocksdb.so GPL -ROCKSDB_CFSTATS NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_CF_OPTIONS NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_COMPACTION_STATS NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_DBSTATS NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_DDL NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_DEADLOCK NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_GLOBAL_INFO NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_INDEX_FILE_MAP NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_LOCKS NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_PERF_CONTEXT NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_PERF_CONTEXT_GLOBAL NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_SST_PROPS NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL -ROCKSDB_TRX NOT INSTALLED INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB ACTIVE STORAGE ENGINE ha_rocksdb.so GPL +ROCKSDB_CFSTATS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_CF_OPTIONS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_COMPACTION_STATS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_DBSTATS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_DDL ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_DEADLOCK ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_GLOBAL_INFO ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_INDEX_FILE_MAP ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_LOCKS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_PERF_CONTEXT ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_PERF_CONTEXT_GLOBAL ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_SST_PROPS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_TRX ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL SEQUENCE ACTIVE STORAGE ENGINE NULL GPL SERVER_AUDIT NOT INSTALLED AUDIT server_audit.so GPL SPATIAL_REF_SYS ACTIVE INFORMATION SCHEMA NULL GPL I will look into this.

            By the way elenst, have you seen is this detected/visible on any test in buildbot.askmonty.org or any other CI system we have access to?

            otto Otto Kekäläinen added a comment - By the way elenst , have you seen is this detected/visible on any test in buildbot.askmonty.org or any other CI system we have access to?
            elenst Elena Stepanova added a comment - - edited

            Yes, it was happening massively in buildbot in the past days, after I removed the suppression for MDEV-19933 fix from minor upgrade tests. I have now added another one, for this issue, so it won't be visible until you say you've pushed the fix and it can be removed.

            elenst Elena Stepanova added a comment - - edited Yes, it was happening massively in buildbot in the past days, after I removed the suppression for MDEV-19933 fix from minor upgrade tests. I have now added another one, for this issue, so it won't be visible until you say you've pushed the fix and it can be removed.

            Debug "trace" of that maintainer scripts run during installation attached. MDEV-23061-debug.txt MDEV-23061-debug.txt

            otto Otto Kekäläinen added a comment - Debug "trace" of that maintainer scripts run during installation attached. MDEV-23061-debug.txt MDEV-23061-debug.txt
            otto Otto Kekäläinen added a comment - This was maybe fixed via https://github.com/MariaDB/server/commit/7c2079f600bacbd4d24762159550b3d40ad856c1 in https://github.com/MariaDB/server/pull/1504 . I have not yet had time to verify properly.

            It still happens at least on 10.5.11

            $ sudo apt-get install -y mariadb-server mariadb-plugin-rocksdb
            ...
            Preparing to unpack .../17-mariadb-plugin-rocksdb_1%3a10.5.11+maria~stretch_amd64.deb ...
            Unpacking mariadb-plugin-rocksdb (1:10.5.11+maria~stretch) ...
            Selecting previously unselected package mariadb-server.
            Preparing to unpack .../18-mariadb-server_1%3a10.5.11+maria~stretch_all.deb ...
            Unpacking mariadb-server (1:10.5.11+maria~stretch) ...
            ...
            $ sudo mysql -e "show engines"
            +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+
            | Engine             | Support | Comment                                                                                         | Transactions | XA   | Savepoints |
            +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+
            | CSV                | YES     | Stores tables as CSV files                                                                      | NO           | NO   | NO         |
            | MRG_MyISAM         | YES     | Collection of identical MyISAM tables                                                           | NO           | NO   | NO         |
            | MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables                                       | NO           | NO   | NO         |
            | Aria               | YES     | Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables | NO           | NO   | NO         |
            | MyISAM             | YES     | Non-transactional engine with good performance and small data footprint                         | NO           | NO   | NO         |
            | SEQUENCE           | YES     | Generated tables filled with sequential values                                                  | YES          | NO   | YES        |
            | InnoDB             | DEFAULT | Supports transactions, row-level locking, foreign keys and encryption for tables                | YES          | YES  | YES        |
            | PERFORMANCE_SCHEMA | YES     | Performance Schema                                                                              | NO           | NO   | NO         |
            +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+
            $ sudo systemctl restart mariadb
            $ sudo mysql -e "show engines"
            +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+
            | Engine             | Support | Comment                                                                                         | Transactions | XA   | Savepoints |
            +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+
            | ROCKSDB            | YES     | RocksDB storage engine                                                                          | YES          | YES  | YES        |
            ...
            

            elenst Elena Stepanova added a comment - It still happens at least on 10.5.11 $ sudo apt-get install -y mariadb-server mariadb-plugin-rocksdb ... Preparing to unpack .../17-mariadb-plugin-rocksdb_1%3a10.5.11+maria~stretch_amd64.deb ... Unpacking mariadb-plugin-rocksdb (1:10.5.11+maria~stretch) ... Selecting previously unselected package mariadb-server. Preparing to unpack .../18-mariadb-server_1%3a10.5.11+maria~stretch_all.deb ... Unpacking mariadb-server (1:10.5.11+maria~stretch) ... ... $ sudo mysql -e "show engines" +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ | CSV | YES | Stores tables as CSV files | NO | NO | NO | | MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | Aria | YES | Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables | NO | NO | NO | | MyISAM | YES | Non-transactional engine with good performance and small data footprint | NO | NO | NO | | SEQUENCE | YES | Generated tables filled with sequential values | YES | NO | YES | | InnoDB | DEFAULT | Supports transactions, row-level locking, foreign keys and encryption for tables | YES | YES | YES | | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ $ sudo systemctl restart mariadb $ sudo mysql -e "show engines" +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ | ROCKSDB | YES | RocksDB storage engine | YES | YES | YES | ...

            i can verify this indeed happens if `apt install mariadb-server mariadb-plugin-rocksdb` is run and both are installed at the same time. This is because apt setups the package `mariadb-server` first:

            ..
            Setting up libmariadb3:amd64 (1:10.5.12+maria~bionic) ...
            Setting up mariadb-client-core-10.5 (1:10.5.12+maria~bionic) ...
            Setting up mariadb-client-10.5 (1:10.5.12+maria~bionic) ...
            Setting up mariadb-server-core-10.5 (1:10.5.12+maria~bionic) ...
            Setting up mariadb-server-10.5 (1:10.5.12+maria~bionic) ...
            Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.
            Setting up mariadb-server (1:10.5.12+maria~bionic) ...
            Setting up mariadb-plugin-rocksdb (1:10.5.12+maria~bionic) ...
            Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
            Processing triggers for ureadahead (0.100.0-21) ...
            Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
            Processing triggers for systemd (237-3ubuntu10.51) ...
            Processing triggers for mariadb-server-10.5 (1:10.5.12+maria~bionic) ...
            ...
             
            $ stat /etc/mysql/mariadb.conf.d/50-server.cnf | grep Change
            Change: 2021-09-13 21:39:14.177949926 -0700
            21:41:46 ⌂45% :~ $ stat /etc/mysql/mariadb.conf.d/rocksdb.cnf | grep Change
            Change: 2021-09-13 21:39:18.297979007 -0700
             
            $ ps -o lstart,cmd -C mariadbd
                             STARTED CMD
            Mon Sep 13 21:39:16 2021 /usr/sbin/mariadbd
             
            $ sudo systemctl status mariadb
            ● mariadb.service - MariaDB 10.5.12 database server
               Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Mon 2021-09-13 21:39:18 PDT; 16s ago
            

            The file `/etc/mysql/mariadb.conf.d/rocksdb.cnf` does not exist when mariadbd is started at 16 seconds past and thus is not loaded/activated. If `mariadb-plugin-rocksdb` is installed separately, it will trigger the systemd service `mariadb` to reload, but the trigger does not run when they are co-installed.

            Debian packages have a concept of pre-depends and mariadb-plugin-rocksdb could perhaps pre-depend on the server, but it seems a bit of a misuse of that directive and we would need to test first if it even has any effect on triggering the server restart. One option would be to somehow force the trigger or server restart via the `mariadb-plugin-rocksdb` postinst script.

            otto Otto Kekäläinen added a comment - i can verify this indeed happens if `apt install mariadb-server mariadb-plugin-rocksdb` is run and both are installed at the same time. This is because apt setups the package `mariadb-server` first: .. Setting up libmariadb3:amd64 (1:10.5.12+maria~bionic) ... Setting up mariadb-client-core-10.5 (1:10.5.12+maria~bionic) ... Setting up mariadb-client-10.5 (1:10.5.12+maria~bionic) ... Setting up mariadb-server-core-10.5 (1:10.5.12+maria~bionic) ... Setting up mariadb-server-10.5 (1:10.5.12+maria~bionic) ... Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service. Setting up mariadb-server (1:10.5.12+maria~bionic) ... Setting up mariadb-plugin-rocksdb (1:10.5.12+maria~bionic) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Processing triggers for ureadahead (0.100.0-21) ... Processing triggers for libc-bin (2.27-3ubuntu1.4) ... Processing triggers for systemd (237-3ubuntu10.51) ... Processing triggers for mariadb-server-10.5 (1:10.5.12+maria~bionic) ... ...   $ stat /etc/mysql/mariadb.conf.d/50-server.cnf | grep Change Change: 2021-09-13 21:39:14.177949926 -0700 21:41:46 ⌂45% :~ $ stat /etc/mysql/mariadb.conf.d/rocksdb.cnf | grep Change Change: 2021-09-13 21:39:18.297979007 -0700   $ ps -o lstart,cmd -C mariadbd STARTED CMD Mon Sep 13 21:39:16 2021 /usr/sbin/mariadbd   $ sudo systemctl status mariadb ● mariadb.service - MariaDB 10.5.12 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/mariadb.service.d └─migrated-from-my.cnf-settings.conf Active: active (running) since Mon 2021-09-13 21:39:18 PDT; 16s ago The file `/etc/mysql/mariadb.conf.d/rocksdb.cnf` does not exist when mariadbd is started at 16 seconds past and thus is not loaded/activated. If `mariadb-plugin-rocksdb` is installed separately, it will trigger the systemd service `mariadb` to reload, but the trigger does not run when they are co-installed. Debian packages have a concept of pre-depends and mariadb-plugin-rocksdb could perhaps pre-depend on the server, but it seems a bit of a misuse of that directive and we would need to test first if it even has any effect on triggering the server restart. One option would be to somehow force the trigger or server restart via the `mariadb-plugin-rocksdb` postinst script.

            Maybe some adjustment to the triggers might help with this?

            ± cat mariadb-server-10.5.triggers
            interest-noawait /etc/mysql
            interest-noawait /etc/systemd/system/mariadb.service.d
             
            ± grep -A 4 triggered mariadb-server-10.5.postinst 
              triggered)
                if [ -d /run/systemd/system ]; then
                  systemctl --system daemon-reload
                else
                  invoke-rc.d mariadb restart
            

            otto Otto Kekäläinen added a comment - Maybe some adjustment to the triggers might help with this? ± cat mariadb-server-10.5.triggers interest-noawait /etc/mysql interest-noawait /etc/systemd/system/mariadb.service.d   ± grep -A 4 triggered mariadb-server-10.5.postinst triggered) if [ -d /run/systemd/system ]; then systemctl --system daemon-reload else invoke-rc.d mariadb restart

            People

              otto Otto Kekäläinen
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.