[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
Mon Mar 4 08:26:34 UTC 2013


severity #698562 wishlist
retitle #698562 upgrade from squeeze => wheezy fails if database has not been created  before the upgrade
thanks

Hi Andreas,

thanks for reacting so fast.

On Sun, Mar 03, 2013 at 09:52:18PM +0100, Andreas Beckmann wrote:
> On 2013-03-03 21:28, Marc Haber wrote:
> > 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.
> 
> If database creation is trivially scriptable, I could add a
> pre_install/post_install hook script to piuparts to do this (if someone
> supplies such a script).

For MySQL, you just neeed to create database pdns and pipe the file
p/usr/share/doc/pdns-backend-mysql/mysql.sql into a mysql instance.
Then you generate a few lines of configuration and you're fine. I am
not sure whether one needs at least one domain and SOA record in the
database for PowerDNS to be truly operational.

After the update, it is necessary to remove the configuration
generated at squeeze installation.

And one needs to use some magic with database passwords. I doubt that
a noninteractive install of the backend package is going to ever
succeed.

And, there is #681248 which is possibily going to kill automatic
updates as well. Unfortunately, PowerDNS is not an example of
robustness when it comes to configuration syntax, but thankfully, it
is only used by experienced administrators who know how to address
such issues.

> > 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.
> 
> Since installation in squeeze succeeded I assumed the package was
> actually functional.

Unfortunately, it is not.

> Feel free to downgrade the severity, but keep the bug found in the
> wheezy version s.t. piuparts-analyze can classify this as a known and
> bugged failure.

Done.

> > 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.
> 
> That's OK. This "pathological synthetic test case" works fine for most
> packages, and will work for pdns/wheezy.

In pdns/wheezy it won't be pathological any more since it will start
with a functional database.

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