0

This morning I noticed that there was an available update for MariaDB, from 5.5.35 to 5.5.36. So I decided to upgrade one of the three nodes in our MariaDB cluster. However the update failed:

root@${hostname}:~# apt-get install -y mariadb-galera-server
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  mariadb-galera-server-5.5 mariadb-server-core-5.5
Suggested packages:
  tinyca mariadb-test
Recommended packages:
  libhtml-template-perl
The following NEW packages will be installed:
  mariadb-server-core-5.5
The following packages will be upgraded:
  mariadb-galera-server mariadb-galera-server-5.5
2 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 29.4 MB of archives.
After this operation, 16.0 MB of additional disk space will be used.
Get:1 http://${ubuntu_mirror_here}/pub/MariaDB/repo/5.5/ubuntu/ precise/main mariadb-galera-server all 5.5.36+maria-1~precise [2994 B]
Get:2 http://${ubuntu_mirror_here}/pub/MariaDB/repo/5.5/ubuntu/ precise/main mariadb-galera-server-5.5 amd64 5.5.36+maria-1~precise [24.0 MB]
Get:3 http://${ubuntu_mirror_here}/pub/MariaDB/repo/5.5/ubuntu/ precise/main mariadb-server-core-5.5 amd64 5.5.36+maria-1~precise [5366 kB]
Fetched 29.4 MB in 3s (8357 kB/s)
(Reading database ... 72891 files and directories currently installed.)
Preparing to replace mariadb-galera-server 5.5.35+maria-1~precise (using .../mariadb-galera-server_5.5.36+maria-1~precise_all.deb) ...
Unpacking replacement mariadb-galera-server ...
Preparing to replace mariadb-galera-server-5.5 5.5.35+maria-1~precise (using .../mariadb-galera-server-5.5_5.5.36+maria-1~precise_amd64.deb) ...
Unpacking replacement mariadb-galera-server-5.5 ...
Selecting previously unselected package mariadb-server-core-5.5.
Unpacking mariadb-server-core-5.5 (from .../mariadb-server-core-5.5_5.5.36+maria-1~precise_amd64.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
 * Stopping MariaDB database server mysqld
   ...done.
 * Stopping MariaDB database server mysqld
   ...done.
dpkg: error processing /var/cache/apt/archives/mariadb-server-core-5.5_5.5.36+maria-1~precise_amd64.deb (--unpack):
 trying to overwrite '/usr/sbin/mysqld', which is also in package mariadb-galera-server-5.5 5.5.36+maria-1~precise
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-server-core-5.5_5.5.36+maria-1~precise_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Purging then re-installing the packages yielded the same failure.

Installing mariadb-server-core-5.5 and mariadb-galera-server-5.5 manually one at a time using dpkg -i foo.deb yielded the same failure, regardless of the order I attempted to install them in.

The packages seem to contain two different versions of the MySQL daemon binary:

root@${hostname}:~# dpkg -c mariadb-server-core-5.5_5.5.36+maria-1~precise_amd64.deb|fgrep /usr/sbin/mysqld
-rwxr-xr-x root/root  14461408 2014-02-24 14:06 ./usr/sbin/mysqld
root@${hostname}:~# dpkg -c mariadb-galera-server-5.5_5.5.36+maria-1~precise_amd64.deb|fgrep /usr/sbin/mysqld
-rwxr-xr-x root/root  14680016 2014-03-10 05:39 ./usr/sbin/mysqld
root@${hostname}:~#

Is this (as I suspect) a packaging bug?

What are my options to work around this problem? Should I just re-install the previous version, 5.5.35?

I assume that eventually, new MariaDB packages will be released that don't have this problem. What's the best way for me to test whether the available packages still have the problem? All I can think of is downloading the .debs every time and repeating the above dpkg -c experiment.

Update: Installing as suggested at https://mariadb.com/kb/en/mariadb-galera-5529-release-notes/ fails in the same way:

apt-get install mariadb-galera-server galera
Reading package lists... Done
Building dependency tree       
Reading state information... Done
galera is already the newest version.
The following extra packages will be installed:
  mariadb-galera-server-5.5 mariadb-server-core-5.5
Suggested packages:
  tinyca mariadb-test
Recommended packages:
  libhtml-template-perl
The following NEW packages will be installed:
  mariadb-galera-server mariadb-galera-server-5.5 mariadb-server-core-5.5
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Need to get 29.4 MB of archives.
After this operation, 97.6 MB of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 http://${ubuntu_mirror_here}/pub/MariaDB/repo/5.5/ubuntu/ precise/main mariadb-server-core-5.5 amd64 5.5.36+maria-1~precise [5,366 kB]
Get:2 http://${ubuntu_mirror_here}/pub/MariaDB/repo/5.5/ubuntu/ precise/main mariadb-galera-server-5.5 amd64 5.5.36+maria-1~precise [24.0 MB]
Get:3 http://${ubuntu_mirror_here}/pub/MariaDB/repo/5.5/ubuntu/ precise/main mariadb-galera-server all 5.5.36+maria-1~precise [2,994 B]
Fetched 29.4 MB in 2s (9,949 kB/s)                 
Preconfiguring packages ...
Selecting previously unselected package mariadb-server-core-5.5.
(Reading database ... 72716 files and directories currently installed.)
Unpacking mariadb-server-core-5.5 (from .../mariadb-server-core-5.5_5.5.36+maria-1~precise_amd64.deb) ...
Unpacking mariadb-galera-server-5.5 (from .../mariadb-galera-server-5.5_5.5.36+maria-1~precise_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/mariadb-galera-server-5.5_5.5.36+maria-1~precise_amd64.deb (--unpack):
 trying to overwrite '/usr/sbin/mysqld', which is also in package mariadb-server-core-5.5 5.5.36+maria-1~precise
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Selecting previously unselected package mariadb-galera-server.
Unpacking mariadb-galera-server (from .../mariadb-galera-server_5.5.36+maria-1~precise_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-galera-server-5.5_5.5.36+maria-1~precise_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Update 2: Downgrading to the previous version, 5.5.35+maria-1~precise, has worked around the problem for now. But this is neither a true solution, nor a good answer to this question.

0

Apparently the packages have merged. Here's the notice on the MariaDB website that references precisely what you are talking about: https://mariadb.com/kb/en/mariadb-galera-5529-release-notes/

One is apparently now a meta-package that includes the other.

  • Thanks for this. However, installing the packages mariadb-galera-server and galera as suggested in that link fails in the same way. I will update the question. – AnotherSmellyGeek Mar 13 '14 at 0:46
0

This was as I suspected a packaging bug, since fixed, as the same problem does not arise with version 5.5.38. The solution, therefore, is not to use the broken version of the package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.