[Pkg-pdns-maintainers] Bug#698562: pdns-backend-{my, pg}sql: fails to upgrade from squeeze: mysqldump: Got error: 1049: Unknown database 'pdns' when selecting the database

Marc Haber mh+debian-packages at zugschlus.de
Sun Mar 3 20:28:03 UTC 2013


Hi,

I need advice how to handle this.


On Sun, Jan 20, 2013 at 02:51:26PM +0100, Andreas Beckmann wrote:
> during a test with piuparts I noticed your package fails to upgrade from
> 'squeeze'.
> It installed fine in 'squeeze', then the upgrade to 'wheezy' fails.
> 
> >>From the attached log (scroll to the bottom...):
> 
>   Setting up pdns-server (3.1-4) ...
>   Installing new version of config file /etc/init.d/pdns ...
>   Replacing config file /etc/default/pdns with new version
>   invoke-rc.d: policy-rc.d denied execution of start.
>   Setting up pdns-backend-mysql (3.1-4) ...
>   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 encountered backing up the old database:
>   mysqldump: Got error: 1049: Unknown database 'pdns' when selecting the database
>   dbconfig-common: pdns-backend-mysql configure: aborted.

In squeeze, pdns's database backends do not immediately work after
package installation. It is necessary to manually create the database
after installing the package. Wheezy's pdns, on the other hand, uses
dbconfig-common to automatically create the databases.

piuparts does not bother to create a database before trying the
upgrade, installs a broken pdns which never worked on squeeze, and
only notices this after trying to upgrade to wheezy.

It would of course be possible to catch this situation during the
upgrade to wheezy and to assume a fresh install. Otoh, this is a
pathological case. Noone would install a DNS server and have it run
in a broken, non functional state. Please comment whether it would be
acceptable to flag this as a bug in squeeze's pdns and downgrade it to
normal or even wishlist.

At least for MySQL, the upgrade works fine when one starts with a
squeeze PowerDNS that is configured to use a configured database and
the database is filled with test records.

I would appreciate if someone could do the same cross check with the
PostgreSQL backend.

I would accept a patch that would make wheezy's PowerDNS fail more
gracefully on an unconfigured squeeze database on update, but at the
moment I have to say that I am not going to spend my time on
developing a work-around for a pathological synthetic test case and do
sincerely apologize for that.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062



More information about the Pkg-pdns-maintainers mailing list