Этим утром я заметил доступное обновление для MariaDB с 5.5.35 до 5.5.36. Поэтому я решил обновить один из трех узлов в нашем кластере MariaDB. Однако обновление не удалось:
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)
Очистка и повторная установка пакетов привела к тому же самому отказу.
Установка mariadb-server-core-5.5 и mariadb-galera-server-5.5 вручную по одному с использованием dpkg -i foo.deb приводила к одному и тому же сбою, независимо от порядка, в котором я пытался их установить.
Пакеты содержат две разные версии двоичного файла демона MySQL:
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}:~#
Это (как я подозреваю) ошибка упаковки?
Каковы мои варианты решения этой проблемы? Должен ли я просто переустановить предыдущую версию 5.5.35?
Я предполагаю, что со временем будут выпущены новые пакеты MariaDB, у которых нет этой проблемы. Как лучше всего проверить, есть ли проблема в доступных пакетах?
Все, что я могу придумать, это каждый раз скачивать .debs и повторять приведенный выше эксперимент dpkg -c
.
Обновление: установка, как предложено по адресу https://mariadb.com/kb/en/mariadb-galera-5529-release-notes/, завершается неудачно таким же образом:
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)
Обновление 2: Снижение до предыдущей версии, 5.5.35+maria-1 ~ precision, решило проблему на данный момент. Но это ни верное решение, ни хороший ответ на этот вопрос.