[debian-mysql] Bug#663720: mysql-server: problems upgrading packages that only suggest/recommand a database server
Andreas Beckmann
debian at abeckmann.de
Tue Mar 13 15:03:49 UTC 2012
Package: mysql-server
Severity: normal
User: debian-qa at lists.debian.org
Usertags: piuparts
Hi,
this is probably not a bug in mysql-server, but the MySQL maintainers
might know the best solution for this problem.
I'm currently experimenting with piuparts (i.e. allowing to run a local
database server in the chroot) and do squeeze->wheezy upgrade tests.
During these experiments I discovered the following upgrade failure, I
give only a rough outline what happend, the full log is attached:
* setup minimal squeeze chroot (do not install recommends by default)
* apt-get install mysql-server # there is only a Suggests: mysql-server
* apt-get install pdns-backend-mysql
* switch sources.list from squeeze to wheezy
* apt-get dist-upgrade
- replaces/unpacks mysql-server*
- repalces/unpacks pdns-server*
- configures pdns-server* (fails because database is not running)
- configures mysql-server*
Log excerpts from the dist-upgrade part:
[...]
Preparing to replace mysql-server-5.1 5.1.49-3 (using .../mysql-server-5.1_5.1.61-2_amd64.deb) ...
Stopping MySQL database server: mysqld.
Stopping MySQL database server: mysqld.
Unpacking replacement mysql-server-5.1 ...
Preparing to replace mysql-server-core-5.1 5.1.49-3 (using .../mysql-server-core-5.1_5.1.61-2_amd64.deb) ...
Unpacking replacement mysql-server-core-5.1 ...
[...]
Preparing to replace pdns-server 2.9.22-8+squeeze1 (using .../pdns-server_3.0-1.1_amd64.deb) ...
Unpacking replacement pdns-server ...
Preparing to replace pdns-backend-mysql 2.9.22-8+squeeze1 (using .../pdns-backend-mysql_3.0-1.1_amd64.deb) ...
Unpacking replacement pdns-backend-mysql ...
[...]
Setting up pdns-server (3.0-1.1) ...
Installing new version of config file /etc/init.d/pdns ...
Setting up pdns-backend-mysql (3.0-1.1) ...
dbconfig-common: writing config to /etc/dbconfig-common/pdns-backend-mysql.conf
Creating config file /etc/dbconfig-common/pdns-backend-mysql.conf with new version
Creating config file /etc/powerdns/pdns.d/pdns.local.gmysql with new version
detected upgrade from previous non-dbconfig version.
creating database backup in /var/cache/dbconfig-common/backups/pdns-backend-mysql_2.9.22-8+squeeze1.mysql.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
unable to connect to mysql server.
error encountered backing up the old database:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
dbconfig-common: pdns-backend-mysql configure: aborted.
dbconfig-common: flushing administrative password
dpkg: error processing pdns-backend-mysql (--configure):
subprocess installed post-installation script returned error exit status 1
[...]
Setting up mysql-client-5.1 (5.1.61-2) ...
Setting up mysql-server-5.1 (5.1.61-2) ...
Installing new version of config file /etc/mysql/debian-start ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..
Setting up mysql-server (5.1.61-2) ...
[...]
Having a package that needs a database only Suggests/Recommends the
corresponding database server is good since it allows to use a remote
database server without being forced to install a local one. I did not
try whether this problem also happens if the package Recommends instead
of Suggests mysql-server. The problem is not frequent as it highly
depends on the set of packages being installed and the upgrade and
configuration order choosen by apt/dpkg.
dpkg --configure --pending would probably fix all the unconfigured
packages. But as long as a package is working in its default
configuration, there should be an error-free upgrade path to the next
distribution.
What is the recommended way of packaging a database-using application
that avoids this pitfall?
I was googling around a bit but found nothing more than
http://people.debian.org/~seanius/policy/dbapp-policy.html/
and the dbconfig-common documentation.
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdns-backend-mysql_3.0-1.1.log.gz
Type: application/x-gzip
Size: 24782 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20120313/bf9ef638/attachment-0001.bin>
More information about the pkg-mysql-maint
mailing list