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

MariaDB-server-compat complicates server upgrade from 10.x to 11.x on CentOS/RHEL 7

    XMLWordPrintable

Details

    Description

      Let's have some 10.x server installed on CentOS 7:

      $ sudo yum install MariaDB-server
      ...
      Complete!
       
      $ sudo rpm -qa | grep Maria
      MariaDB-common-10.5.21-1.el7.centos.x86_64
      MariaDB-server-10.5.21-1.el7.centos.x86_64
      MariaDB-compat-10.5.21-1.el7.centos.x86_64
      MariaDB-client-10.5.21-1.el7.centos.x86_64
      

      If we are trying to upgrade to any higher 10.x, then as usual, server will refuse to upgrade because we explicitly forbid it to do so, while the rest will upgrade.

      $ sudo yum upgrade MariaDB-common MariaDB-server MariaDB-compat MariaDB-client
      ...
      Updated:
        MariaDB-client.x86_64 0:10.11.4-1.el7.centos                 MariaDB-common.x86_64 0:10.11.4-1.el7.centos                 MariaDB-compat.x86_64 0:10.11.4-1.el7.centos                
       
      Failed:
        MariaDB-server.x86_64 0:10.5.21-1.el7.centos                                                MariaDB-server.x86_64 0:10.11.4-1.el7.centos                                               
       
      $ sudo rpm -qa | grep Maria
      MariaDB-server-10.5.21-1.el7.centos.x86_64
      MariaDB-compat-10.11.4-1.el7.centos.x86_64
      MariaDB-common-10.11.4-1.el7.centos.x86_64
      MariaDB-client-10.11.4-1.el7.centos.x86_64
      

      So, we need to remove MariaDB-server, as the error text demands, and install the new server instead. That works.

      $ sudo yum remove MariaDB-server
      ...
      Removed:
        MariaDB-server.x86_64 0:10.5.21-1.el7.centos                                                                                                                                           
       
      Complete!
      

      $ sudo yum install MariaDB-server
      ...
      Installed:
        MariaDB-server.x86_64 0:10.11.4-1.el7.centos                                                                                                                                           
       
      Complete!
      

      But if we are instead trying to upgrade to 11.x, it doesn't just refuse to upgrade the server and upgrades the other 3 packages; it also installs MariaDB-server-compat and MariaDB-client-compat for dependencies.

      Dependency Installed:
        MariaDB-client-compat.noarch 0:11.0.2-1.el7.centos                                          MariaDB-server-compat.noarch 0:11.0.2-1.el7.centos                                         
       
      Updated:
        MariaDB-client.x86_64 0:11.0.2-1.el7.centos                  MariaDB-common.x86_64 0:11.0.2-1.el7.centos                  MariaDB-compat.x86_64 0:11.0.2-1.el7.centos                 
       
      Failed:
        MariaDB-server.x86_64 0:10.11.4-1.el7.centos                                                MariaDB-server.x86_64 0:11.0.2-1.el7.centos                                               
      

      And now removal of MariaDB-server no longer works.

      $ sudo yum remove MariaDB-server
      ...
      ERROR with transaction check vs depsolve:
      MariaDB-server >= 11.0.0 is needed by (installed) MariaDB-server-compat-11.0.2-1.el7.centos.noarch
      ** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
      MariaDB-client-11.0.2-1.el7.centos.x86_64 has installed conflicts MariaDB-server < ('0', '11.0.0', None): MariaDB-server-10.11.4-1.el7.centos.x86_64
      MariaDB-server-compat-11.0.2-1.el7.centos.noarch has missing requires of MariaDB-server >= ('0', '11.0.0', None)
      

      Instead, the user needs to remove explicitly 10.x server and 11.x server-compat, only then it works. This is odd, because even the error says that compat packages require server 11.x. They shouldn't have succeeded to install maybe, but if they got installed, they shouldn't mind removal of 10.x server which they have no relation to.

      As I understand, the problem only affects old distributions which don't distinguish requirements from recommendations (RHEL/CentOS 7 for sure, maybe old SLES too), so it may be acceptable just to document it. Maybe the error text about a manual upgrade could mention something as well.

      Attachments

        Activity

          People

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