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

2013-03-04 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 severity #698562 wishlist
Bug #698562 [pdns-backend-mysql,pdns-backend-pgsql] pdns-backend-{my, pg}sql: 
fails to upgrade from squeeze: mysqldump: Got error: 1049: Unknown database 
'pdns' when selecting the database
Severity set to 'wishlist' from 'serious'
 retitle #698562 upgrade from squeeze = wheezy fails if database has not been 
 created  before the upgrade
Bug #698562 [pdns-backend-mysql,pdns-backend-pgsql] pdns-backend-{my, pg}sql: 
fails to upgrade from squeeze: mysqldump: Got error: 1049: Unknown database 
'pdns' when selecting the database
Changed Bug title to 'upgrade from squeeze = wheezy fails if database has not 
been created  before the upgrade' from 'pdns-backend-{my, pg}sql: fails to 
upgrade from squeeze: mysqldump: Got error: 1049: Unknown database 'pdns' when 
selecting the database'
 thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
698562: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698562
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2013-03-04 Thread Marc Haber
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


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2013-03-03 Thread Marc Haber
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


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2013-03-03 Thread Andreas Beckmann
On 2013-03-03 21:28, Marc Haber wrote:
 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.

Thanks for clarifying this.

 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).

 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. 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.

 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.


Andreas


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org