Debian Bug report logs - #470066
cacti: Cacti reconfiguration hangs on ucf call

version graph

Package: cacti; Maintainer for cacti is Cacti Maintainer <pkg-cacti-maint@lists.alioth.debian.org>; Source for cacti is src:cacti (PTS, buildd, popcon).

Reported by: Shalon Wood <dstar@pele.cx>

Date: Sat, 8 Mar 2008 22:45:03 UTC

Severity: grave

Tags: patch

Found in version cacti/0.8.7b-1

Fixed in version cacti/0.8.7b-1.1

Done: Andreas Henriksson <andreas@fatal.se>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#470066; Package cacti. (full text, mbox, link).


Acknowledgement sent to Shalon Wood <dstar@pele.cx>:
New Bug report received and forwarded. Copy sent to Sean Finney <seanius@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Shalon Wood <dstar@pele.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: cacti: Cacti reconfiguration hangs on ucf call
Date: Sat, 08 Mar 2008 16:43:19 -0600
Package: cacti
Version: 0.8.7b-1
Severity: grave
Justification: renders package unusable


Cacti configuration hangs, with the last displayed line being 'dbconfig-common: flushing admin password'. Inserting diagnostic echos in /var/lib/dpkg/info/cacti.postinst reveals the following line to be the problem:

ucf /usr/share/doc/cacti/cacti.apache.conf /etc/cacti/apache.conf

Running that command by hand resulted in an immediate return with no errors, so I commented the line out and attempted to install again. The install completed with no errors.

(I'm not positive this should be a 'grave' bug, but since it can't be installed  it seemed to fit the criteria. Feel free to re-classify)

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19highmem
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages cacti depends on:
ii  apache [httpd]                1.3.34-4.1 versatile, high-performance HTTP s
ii  apache2-mpm-prefork [httpd]   2.0.55-4   traditional model for Apache2
ii  dbconfig-common               1.8.36     common framework for packaging dat
ii  debconf [debconf-2.0]         1.5.19     Debian configuration management sy
ii  libphp-adodb                  4.96-1     The ADOdb database abstraction lay
ii  lighttpd [httpd]              1.4.15-1   A fast webserver with minimal memo
ii  logrotate                     3.7.1-3    Log rotation utility
ii  mysql-client-5.0 [virtual-mys 5.0.51a-3  MySQL database client binaries
ii  php4                          4:4.4.2-1  server-side, HTML-embedded scripti
ii  php4-cli                      6:4.4.4-9  command-line interpreter for the p
ii  php4-mysql                    6:4.4.4-9  MySQL module for php4
ii  php4-snmp                     6:4.4.4-9  SNMP module for php4
ii  rrdtool                       1.2.27-1   Time-series data storage and displ
ii  snmp                          5.2.3-7    NET SNMP (Simple Network Managemen
ii  ucf                           3.005      Update Configuration File: preserv

Versions of packages cacti recommends:
pn  iputils-ping                  <none>     (no description available)
ii  mysql-server                  5.0.51a-3  MySQL database server (meta packag
ii  mysql-server-5.0 [mysql-serve 5.0.51a-3  MySQL database server binaries

-- debconf information:
* cacti/webserver: Apache
  cacti/dbconfig-upgrade: true
  cacti/internal/skip-preseed: false
  cacti/dbconfig-remove:
  cacti/remote/port:
  cacti/dbconfig-reinstall: false
  cacti/db/app-user: cacti
  cacti/mysql/admin-user: root
  cacti/mysql/method: unix socket
  cacti/remote/host:
  cacti/upgrade-error: abort
  cacti/remote/newhost:
  cacti/purge: false
  cacti/missing-db-package-error: abort
  cacti/database-type: mysql
  cacti/remove-error: abort
  cacti/db/dbname: cacti
  cacti/upgrade-backup: true
  cacti/install-error: abort
  cacti/internal/reconfiguring: false
  cacti/passwords-do-not-match:
* cacti/dbconfig-install: true




Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#470066; Package cacti. (full text, mbox, link).


Acknowledgement sent to Niko Tyni <ntyni@debian.org>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (full text, mbox, link).


Message #10 received at 470066@bugs.debian.org (full text, mbox, reply):

From: Niko Tyni <ntyni@debian.org>
To: 469513@bugs.debian.org
Cc: 468101@bugs.debian.org, 470066@bugs.debian.org
Subject: Re: Bug#469513: ucf blocks on ocsinventory-agent(1:0.0.8-1) and cacti (0.8.7b-1)
Date: Sun, 9 Mar 2008 20:57:52 +0200
On Wed, Mar 05, 2008 at 04:14:55PM +0000, tj@uevora.pt wrote:
> Package: ucf
> Version: 3.005
> Severity: important

> ucf blocks on ocsinventory-agent(1:0.0.8-1) and cacti (0.8.7b-1)
> installation process. Quick solution was to downgrade ucf to version
> 2.0020 (stable).

This is also #468101 and #470066. 

The problem is that the new db_x_loadtemplatefile() call in ucf hangs if
db_stop has been called. With 'set -x' in ucf:

  Setting up ocsinventory-agent (1:0.0.8-1) ...
  ++ basename /usr/bin/ucf
  + progname=ucf
  + pversion='$Revision: 1.26 $'
  + '[' -z '' ']'
  + '[' 1 ']'
  + DEBCONF_ALREADY_RUNNING=YES
  + export DEBCONF_ALREADY_RUNNING
  + '[' -e /usr/share/debconf/confmodule ']'
  ++ id -u
  + test 0 = 0
  + . /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
   
Both the cacti and ocsinventory-agent postinst scripts call db_stop before
invoking ucf.

The previous ucf version loaded the templates only if
DEBCONF_ALREADY_RUNNING was set to 'no'; this changed in 3.005 and
apparently broke both cacti and ocsinventory-agent.

Cheers,
-- 
Niko Tyni   ntyni@debian.org




Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#470066; Package cacti. (full text, mbox, link).


Acknowledgement sent to Manoj Srivastava <srivasta@acm.org>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (full text, mbox, link).


Message #15 received at 470066@bugs.debian.org (full text, mbox, reply):

From: Manoj Srivastava <srivasta@acm.org>
To: Niko Tyni <ntyni@debian.org>
Cc: 469513@bugs.debian.org, 468101@bugs.debian.org, 470066@bugs.debian.org
Subject: Re: Bug#469513: ucf blocks on ocsinventory-agent(1:0.0.8-1) and cacti (0.8.7b-1)
Date: Sun, 09 Mar 2008 15:23:57 -0500
clone 469513 -1
reassign -1  cacti
retitle -1 Do not call db_stop before calling ucf, since ucf uses debconf
reassign 469513 ocsinventory-agent
retitle 469513 Do not call db_stop before calling ucf, since ucf uses debconf
thanks

On Sun, 9 Mar 2008 20:57:52 +0200, Niko Tyni <ntyni@debian.org> said: 

> On Wed, Mar 05, 2008 at 04:14:55PM +0000, tj@uevora.pt wrote:
>> Package: ucf Version: 3.005 Severity: important

>> ucf blocks on ocsinventory-agent(1:0.0.8-1) and cacti (0.8.7b-1)
>> installation process. Quick solution was to downgrade ucf to version
>> 2.0020 (stable).

> This is also #468101 and #470066.

> Both the cacti and ocsinventory-agent postinst scripts call db_stop
> before invoking ucf.

        Yes. On Bug#468160, Bernhard R Link explains:

      The reason for this seams to be that pdns-server is calling
      db_stop before calling ucf. Thus when ucf tries to contact
      debconf, it gets no answer. (as it just calls confmodule which
      does not restart debconf as all the environment variables are
      already there).

> The previous ucf version loaded the templates only if
> DEBCONF_ALREADY_RUNNING was set to 'no'; this changed in 3.005 and
> apparently broke both cacti and ocsinventory-agent.

        The previous version just did not notice that debconf was not
 responding.

        That was a bug in the old version of ucf, trying to work around
 scripts calling ucf with an unusable debconf.  According to policy, it
 is a bug not to use debconf to interact with the user  -- what if the
 user is using a graphical debconf front-end, and not paying attention to
 the terminal where the install was started? What if there is no such
 terminal? 

        manoj
-- 
T-shirt Of The Day: I'm the person your mother warned you about.
Manoj Srivastava <srivasta@acm.org> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C




Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#470066; Package cacti. (full text, mbox, link).


Acknowledgement sent to Andreas Henriksson <andreas@fatal.se>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (full text, mbox, link).


Message #20 received at 470066@bugs.debian.org (full text, mbox, reply):

From: Andreas Henriksson <andreas@fatal.se>
To: 470066@bugs.debian.org
Cc: control@bugs.debian.org
Subject: nmu diff for fixing db_stop/ucf problem in cacti.
Date: Mon, 17 Mar 2008 13:18:33 +0100
[Message part 1 (text/plain, inline)]
tag 470066 + patch
thanks

Hello!

The solution manoj suggested looked trivial enough that it shouldn't have any
side-effects in cacti and works fine when I tested it. Here's the patch...

-- 
Regards,
Andreas Henriksson
[cacti-nmu-470066.diff (text/x-diff, attachment)]

Tags added: patch Request was from Andreas Henriksson <andreas@fatal.se> to control@bugs.debian.org. (Mon, 17 Mar 2008 13:10:37 GMT) (full text, mbox, link).


Reply sent to Andreas Henriksson <andreas@fatal.se>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Shalon Wood <dstar@pele.cx>:
Bug acknowledged by developer. (full text, mbox, link).


Message #27 received at 470066-close@bugs.debian.org (full text, mbox, reply):

From: Andreas Henriksson <andreas@fatal.se>
To: 470066-close@bugs.debian.org
Subject: Bug#470066: fixed in cacti 0.8.7b-1.1
Date: Mon, 17 Mar 2008 16:32:04 +0000
Source: cacti
Source-Version: 0.8.7b-1.1

We believe that the bug you reported is fixed in the latest version of
cacti, which is due to be installed in the Debian FTP archive:

cacti_0.8.7b-1.1.diff.gz
  to pool/main/c/cacti/cacti_0.8.7b-1.1.diff.gz
cacti_0.8.7b-1.1.dsc
  to pool/main/c/cacti/cacti_0.8.7b-1.1.dsc
cacti_0.8.7b-1.1_all.deb
  to pool/main/c/cacti/cacti_0.8.7b-1.1_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 470066@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Henriksson <andreas@fatal.se> (supplier of updated cacti package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 17 Mar 2008 12:52:17 +0100
Source: cacti
Binary: cacti
Architecture: source all
Version: 0.8.7b-1.1
Distribution: unstable
Urgency: low
Maintainer: Sean Finney <seanius@debian.org>
Changed-By: Andreas Henriksson <andreas@fatal.se>
Description: 
 cacti      - Frontend to rrdtool for monitoring systems and services
Closes: 470066
Changes: 
 cacti (0.8.7b-1.1) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Move ucf call in cacti.postinst above db_stop to fix freeze during
     installation. (Closes: #470066)
Files: 
 683020cae4eacbc5943755cd3fd516d3 580 web extra cacti_0.8.7b-1.1.dsc
 73bbc2a8fa6a3acc0f3e79cd388dc0e5 33052 web extra cacti_0.8.7b-1.1.diff.gz
 fc1ea66efefde798dbdaf9409ef0d440 1824480 web extra cacti_0.8.7b-1.1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH3pldcgQ2cL3l8e4RApoPAKC9pB/iEdE1rcTVsX/wywbl37FkeQCgzjxS
MvVYp+K5+V7Ao/gSmKBg5zA=
=WCa/
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 15 Apr 2008 07:42:10 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 09:26:13 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.