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

Systemd service does not get re-enabled after upgrade

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.1.39, 10.2.24
    • Fix Version/s: 10.1, 10.2
    • Component/s: Platform RedHat
    • Labels:
      None

      Description

      Starting from 10.1.39, pre-uninstall scriplet disables mariadb service. But if later the server is reinstalled/upgraded, the post-install service doesn't always enable the service, so it stays disabled.

      As a side-effect, mysql alias of the service doesn't work after upgrade, and mysqld alias is not even recognized:

      [buildbot@centos73-amd64 ~]$ systemctl status mysql --no-pager
      ● mysql.service - LSB: start and stop MariaDB
         Loaded: loaded (/etc/rc.d/init.d/mysql; bad; vendor preset: disabled)
         Active: inactive (dead)
           Docs: man:systemd-sysv-generator(8)
      [buildbot@centos73-amd64 ~]$ systemctl status mysqld --no-pager
      Unit mysqld.service could not be found.
       
      [buildbot@centos73-amd64 ~]$ sudo systemctl enable mariadb 
      Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service.
      Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service.
      Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
      [buildbot@centos73-amd64 ~]$ systemctl status mysqld --no-pager
      ● mariadb.service - MariaDB 10.3.15 database server
         Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
        Drop-In: /etc/systemd/system/mariadb.service.d
                 └─migrated-from-my.cnf-settings.conf, tokudb.conf
         Active: active (running) since Thu 2019-05-09 21:59:30 UTC; 1h 27min ago
           Docs: man:mysqld(8)
                 https://mariadb.com/kb/en/library/systemd/
       Main PID: 3027 (mysqld)
         Status: "Taking your SQL requests now..."
         CGroup: /system.slice/mariadb.service
                 └─3027 /usr/sbin/mysqld
       
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [ERROR] mysqld: Server GSSAPI error (major 85...mpty.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [ERROR] Plugin 'gssapi' init function returned error.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [Note] Server socket created on IP: '::'.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [ERROR] Incorrect definition of table mysql.e...'POST
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [ERROR] mysqld: Event Scheduler: An error occ...uler.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [Note] Reading of all Master_info entries succeded
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [Note] Added new Master_info '' to hash table
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [Note] /usr/sbin/mysqld: ready for connections.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: Version: '10.3.15-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  po...erver
      May 09 21:59:30 centos73-amd64 systemd[1]: Started MariaDB 10.3.15 database server.
      Hint: Some lines were ellipsized, use -l to show in full.
      [buildbot@centos73-amd64 ~]$ 
      [buildbot@centos73-amd64 ~]$ systemctl status mysql --no-pager
      ● mariadb.service - MariaDB 10.3.15 database server
         Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
        Drop-In: /etc/systemd/system/mariadb.service.d
                 └─migrated-from-my.cnf-settings.conf, tokudb.conf
         Active: active (running) since Thu 2019-05-09 21:59:30 UTC; 1h 29min ago
           Docs: man:mysqld(8)
                 https://mariadb.com/kb/en/library/systemd/
       Main PID: 3027 (mysqld)
         Status: "Taking your SQL requests now..."
         CGroup: /system.slice/mariadb.service
                 └─3027 /usr/sbin/mysqld
       
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [ERROR] mysqld: Server GSSAPI error (major 85...mpty.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [ERROR] Plugin 'gssapi' init function returned error.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [Note] Server socket created on IP: '::'.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [ERROR] Incorrect definition of table mysql.e...'POST
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [ERROR] mysqld: Event Scheduler: An error occ...uler.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [Note] Reading of all Master_info entries succeded
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [Note] Added new Master_info '' to hash table
      May 09 21:59:30 centos73-amd64 mysqld[3027]: 2019-05-09 21:59:30 0 [Note] /usr/sbin/mysqld: ready for connections.
      May 09 21:59:30 centos73-amd64 mysqld[3027]: Version: '10.3.15-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  po...erver
      May 09 21:59:30 centos73-amd64 systemd[1]: Started MariaDB 10.3.15 database server.
      Hint: Some lines were ellipsized, use -l to show in full.
      

      Important note: In order to avoid failures with mysql alias, we will explicitly re-enable the service before using the alias in RPM upgrade tests. It needs to be re-visited after the problem is fixed one or another way.

        Attachments

          Activity

            People

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: