pdns-server doen't complete post-installation script

Bug #195509 reported by Christian Lofstedt
6
Affects Status Importance Assigned to Milestone
pdns (Ubuntu)
Fix Released
Medium
Steve Langasek
ucf (Debian)
Fix Released
Unknown
ucf (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: pdns-server

# apt-get install pdns-backend-mysql pdns_server

Setting up pdns-server (2.9.21-5) ...
Creating user and group pdns...done
(this is where it pauses and does nothing)

Some simple debugging info follows.

The post-install script makes it to this line:
  ucf $PDNSCONFTEMP $PDNSCONF

The script tries to run this command:
  ucf /tmp/tmp.DPDRT13701 /etc/powerdns/pdns.d/pdns.local

Running that line manually works flawlessly but for some reason it makes the post-install script hang.
Tested on two different installs of Hardy alpha4+5 (pdns-server-2.9.21-5_amd64.deb)

Revision history for this message
Jan Groenewald (jan-aims) wrote :

Confirmed on hardy:

root@kontiki:~# sudo vim /var/lib/dpkg/info/pdns-server.postinst
# add -x to the #!/bin/sh line
root@kontiki:~# dpkg --configure pdns-server
Setting up pdns-server (2.9.21-5) ...
+ set -e
+ . /usr/share/debconf/confmodule
+ [ ! ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [ ]
+ exec /usr/share/debconf/frontend /var/lib/dpkg/info/pdns-server.postinst configure
+ set -e
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z ]
+ exec
+ [ ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ PDNSCONF=/etc/powerdns/pdns.conf
+ PDNSDEFAULT=/etc/default/pdns
+ [ -e /etc/powerdns/pdns.conf ]
+ [ -z ]
+ PDNSDIR=/etc/powerdns/pdns.d
+ PDNSLOCAL=/etc/powerdns/pdns.d/pdns.local
+ mktemp
+ PDNSCONFTEMP=/tmp/tmp.WFsxCq6792
+ mktemp
+ PDNSLOCALTEMP=/tmp/tmp.mHkvGR6793
+ mktemp
+ PDNSDEFAULTTEMP=/tmp/tmp.hxHFkn6794
+ getent group pdns
+ [ -z pdns:x:130: ]
+ getent passwd pdns
+ [ -z pdns:x:116:130:PowerDNS,,,:/var/spool/powerdns:/bin/false ]
+ cat /usr/share/pdns-server/pdns.conf
+ cat /usr/share/pdns-server/pdns.local
+ cat /usr/share/pdns-server/pdns
+ splitconfig
+ [ -e /etc/powerdns/pdns.conf ]
+ db_get pdns-server/localaddress
+ _db_cmd GET pdns-server/localaddress
+ IFS= printf %s\n GET pdns-server/localaddress
+ IFS=
 read -r _db_internal_line
+ RET=
+ return 0
+ [ ! -z ]
+ db_get pdns-server/allowrecursion
+ _db_cmd GET pdns-server/allowrecursion
+ IFS= printf %s\n GET pdns-server/allowrecursion
+ IFS=
 read -r _db_internal_line
+ RET=127.0.0.1
+ return 0
+ [ ! -z 127.0.0.1 ]
+ sed -i -e s|^\(#\)\?\(# \)\?allow-recursion=.*$|allow-recursion=127.0.0.1| /tmp/tmp.WFsxCq6792
+ db_get pdns-server/autostart
+ _db_cmd GET pdns-server/autostart
+ IFS= printf %s\n GET pdns-server/autostart
+ IFS=
 read -r _db_internal_line
+ RET=true
+ return 0
+ [ -z true ]
+ [ true = true ]
+ sed -i -e s/^START=.*$/START=yes/ /tmp/tmp.hxHFkn6794
+ db_stop
+ echo STOP
+ ucf /tmp/tmp.WFsxCq6792 /etc/powerdns/pdns.conf
# freezes here
# ctl-c
dpkg: error processing pdns-server (--configure):
 subprocess post-installation script killed by signal (Interrupt)
Errors were encountered while processing:
 pdns-server
root@kontiki:~#
root@kontiki:~# ucf /tmp/tmp.WFsxCq6792 /etc/powerdns/pdns.conf

Creating config file /etc/powerdns/pdns.conf with new version
root@kontiki:~#

Revision history for this message
Sammy Spets (sammys) wrote :

Confirmed on hardy beta.

Changed in pdns:
status: New → Confirmed
Revision history for this message
Sammy Spets (sammys) wrote :

A bit of further debugging using -x shows it blocking in /usr/share/debconf/confmodule.

+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z 1 ']'
+ db_x_loadtemplatefile /var/lib/dpkg/info/ucf.templates ucf
+ _db_cmd 'X_LOADTEMPLATEFILE /var/lib/dpkg/info/ucf.templates' ucf
+ IFS=' '
+ printf '%s\n' 'X_LOADTEMPLATEFILE /var/lib/dpkg/info/ucf.templates ucf'
+ IFS='
'
+ read -r _db_internal_line

Revision history for this message
Sammy Spets (sammys) wrote :
Revision history for this message
Sammy Spets (sammys) wrote :

Moving the bug to affect ucf package as the problem appears to be in that package and not pdns-server.

Changed in ucf:
status: Confirmed → New
Revision history for this message
Steve Langasek (vorlon) wrote :

There is a ucf bug here, but pdns is also invoking ucf wrong. pdns is already debconf-aware, so should be invoking ucf correctly so that it uses debconf instead of prompting via the tty; and if pdns were doing this, the ucf bug would not be an issue here.

I'll work on fixing this issue in both packages.

Changed in pdns:
assignee: nobody → vorlon
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pdns - 2.9.21-5ubuntu1

---------------
pdns (2.9.21-5ubuntu1) hardy; urgency=low

  * Call ucf first before calling db_stop, since the latter shuts down
    all debconf interactions and we should prefer debconf for ucf. Also
    call ucf with --debconf-ok, so there's no confusion about this.
    LP: #195509.
  * Modify Maintainer value to match the DebianMaintainerField
    specification.

 -- Steve Langasek <email address hidden> Wed, 09 Apr 2008 09:18:43 +0000

Changed in pdns:
status: In Progress → Fix Released
Changed in ucf:
status: Unknown → Fix Released
Daniel T Chen (crimsun)
Changed in ucf:
status: New → Fix Released
Steve Langasek (vorlon)
Changed in ucf:
status: Fix Released → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote :

Sorry, I earlier claimed that there was a ucf bug here, but I don't seem to have said /what/ the bug was and I don't remember now. The Debian bug report has been closed as a non-bug; since pdns is also fixed now, I'm likewise closing the Ubuntu ucf task as invalid.

Changed in ucf (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.