We use mariadb with galera. All works well, but every time we upgrade with sudo apt-get upgrade it thinks it fails to upgrade mariadb-server, but it does work fine. I think the issue is caused because it takes a long time to start the server again as it needs to catch up with what it missed from the other servers while it was down and so the upgrade script thinks there was a problem.

The issue is that now whenever I call sudo apt-get upgrade it tries (and fails) again. How can I manually tell it that that package is fine and to just leave it alone? Thanks.

Setting up mariadb-galera-server-5.5 (5.5.37+maria-1~saucy) ...
 * Stopping MariaDB database server mysqld                                                                                                                                                                              [ OK ]
 * Starting MariaDB database server mysqld                                                                                                                                                                              [fail]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mariadb-galera-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-galera-server:
 mariadb-galera-server depends on mariadb-galera-server-5.5 (= 5.5.37+maria-1~saucy); however:
  Package mariadb-galera-server-5.5 is not configured yet.

dpkg: error processing package mariadb-galera-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                 Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

vioadmin@dachshund:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] n

Just hold these two packages mariadb-galera-server-5.5 and mariadb-galera-server.

sudo apt-mark hold mariadb-galera-server-5.5
sudo apt-mark hold mariadb-galera-server

Now it won't setup mariadb server after running sudo apt-get upgrade command.

  • Thanks, but if it do this, how will I ever get alerted that there is a real update that I should be installing? If I mark as held, how are they held until I un-hold or just for that ssh session? Can increase the "timeout" of the initscript start action instead? – Luke Cousins Jun 16 '14 at 9:15
  • I've found out how to do it. Call export MYSQLD_STARTUP_TIMEOUT=900 before the upgrade to set the timeout in the mysql initscript to 15 minutes (which should be plenty). I'll mark your answer as accepted as it does answer my original question. Thanks for your help, it's good to know. – Luke Cousins Jun 16 '14 at 9:30

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.