[MDEV-18345] Installation of galera-4 RPM fails when older galera is present Created: 2019-01-23  Updated: 2019-01-27  Resolved: 2019-01-27

Status: Closed
Project: MariaDB Server
Component/s: Galera, Packaging
Affects Version/s: 10.4
Fix Version/s: N/A

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


 Description   

https://internal.askmonty.org/buildbot/builders/kvm-rpm-centos6-amd64/builds/13880/steps/major-upgrade-server/logs/stdio

  file /usr/bin/garbd from install of galera-4-26.4.0-1.rhel6.el6.x86_64 conflicts with file from package galera-25.3.25-1.rhel6.el6.x86_64

galera-4 should either replace galera-25.3.x or co-exist with it. Now it does neither.



 Comments   
Comment by Elena Stepanova [ 2019-01-23 ]

Strangely, it didn't fail on Fedora28/29. I don't know what's the difference is.

Comment by Sergei Golubchik [ 2019-01-27 ]

Both systems do

sudo sh -c 'yum -y --nogpgcheck install MariaDB-server MariaDB-client'

with a similar result

================================================================================
 Package                    Arch        Version              Repository    Size
================================================================================
Installing:
 MariaDB-client             x86_64      10.3.12-1.fc28       mariadb       11 M
 MariaDB-server             x86_64      10.3.12-1.fc28       mariadb       24 M
Installing dependencies:
 MariaDB-common             x86_64      10.3.12-1.fc28       mariadb       80 k
 boost-program-options      x86_64      1.66.0-8.fc28        updates      179 k
 galera                     x86_64      25.3.25-1.fc28       updates      1.3 M
================================================================================

and both do

sudo sh -c 'yum -y remove MariaDB-common MariaDB-server MariaDB-client'

But on fedora28 it's

 
================================================================================
 Package                    Arch        Version             Repository     Size
================================================================================
Removing:
 MariaDB-client             x86_64      10.3.12-1.fc28      @mariadb       56 M
 MariaDB-common             x86_64      10.3.12-1.fc28      @mariadb      285 k
 MariaDB-server             x86_64      10.3.12-1.fc28      @mariadb      117 M
Removing dependent packages:
 galera                     x86_64      25.3.25-1.fc28      @updates      4.2 M
Removing unused dependencies:
 boost-program-options      x86_64      1.66.0-8.fc28       @updates      521 k
================================================================================

While on CentOS 7.3 it's

================================================================================
 Package             Arch        Version                   Repository      Size
================================================================================
Removing:
 MariaDB-client      x86_64      10.3.12-1.el7.centos      @mariadb       222 M
 MariaDB-common      x86_64      10.3.12-1.el7.centos      @mariadb       717 k
 MariaDB-compat      x86_64      10.3.12-1.el7.centos      @mariadb        14 M
 MariaDB-server      x86_64      10.3.12-1.el7.centos      @mariadb       514 M
Removing for dependencies:
 postfix             x86_64      2:2.10.1-6.el7            @anaconda       12 M
================================================================================

As you can see, CentOS does not remove dependent packages, so galera stays installed and conflicts with the galera-4, when MariaDB 10.4 tries to pull it in.

This behavior is configured in yum.conf (or dnf.conf), with clean_requirements_on_remove setting. Which is True on fedora28 and unset on CentOS 73.

As a fix we could either use yum autoremove, which removes a package and all dependencies. Or set clean_requirements_on_remove in CentOS 7.3 images. I'll try the first fix now.

Comment by Sergei Golubchik [ 2019-01-27 ]

autoremove worked

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