Bug #1213

debconf-set-selections cannot be called before the package is installed

Added by Mathieu Parent about 4 years ago. Updated over 1 year ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Nigel Kersten % Done:

0%

Category:Debian
Target version:-
Affected Puppet version: Branch:
Keywords:
Votes: 0

Description

Preseeding with dpkg doesn’t work for newly installed packages.


Detail:

Using the following class:

#!ruby

class glpi {
    file{'/etc/dpkg/glpi.response':
        ensure=>present,
        content=>'glpi    glpi/dbconfig-install   boolean false
glpi    glpi/dbconfig-upgrade   boolean false';
    }
    package{'glpi':
        ensure=>installed,
        responsefile=>'/etc/dpkg/glpi.response',
        require=>File['/etc/dpkg/glpi.response'];
    }
}

I get:

info: Package[glpi](provider=apt): Preseeding /etc/dpkg/glpi.response to debconf-set-selections
err: //Node[xian]/glpi/Package[glpi]/ensure: change from purged to present failed: Execution of '/usr/bin/debconf-set-selections /etc/dpkg/glpi.response' returned 256: error: Cannot find a question for glpi/dbconfig-install
error: Cannot find a question for glpi/dbconfig-upgrade

History

Updated by Luke Kanies about 4 years ago

Can someone with more knowledge of dpkg look at this? I’m pretty lost.

Updated by Redmine Admin almost 4 years ago

  • Status changed from 1 to Unreviewed

Updated by Bryan McLellan almost 4 years ago

10:54 < cjwatson> that's odd, seems like a bug

What’s the exact debian package version of the glpi deb?

Updated by Mathieu Parent almost 4 years ago

Hi,

thanks for taking care of this bug.

I don’t remember the version; probably 0.70.2-1. It was glpi from testing while using etch as base repository. So maybe the debonf templates are not synchronized with all sources?

Updated by Bryan McLellan almost 4 years ago

I saw the same problem while trying to setup a preseed for ocsreports-server package from testing on etch.

Are you getting that error on the node that you did the initial testing on, such as installing the package and using debconf-get-selections to get a list of questions? If so, try running ‘/usr/share/debconf/fix_db.pl’ on the node, if you get output like:

debconf: template "ocsinventory-server/mysql/admin-pass" claims to be used by nonexistant question "ocsinventory-server/mysql/admin-pass"; removing that.

Then the debconf database was a little corrupt from doing things in an order debconf didn’t expect, and has cleaned up. Try running puppet on the node again after that.

See also debian bug #487300. [1]

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487300

Updated by AJ Christensen almost 4 years ago

Hi btm, are you suggesting this is an underlying issue with Debian? Should puppet call /usr/share/debconf/fix_db.pl when responsefile=> is used in the apt|aptitude|dpkg package providers, and OS is debian|ubuntu perhaps?

I’m just trying to ascertain if I should accept this and get a fix rolling for Puppet, or reject it based on an issue with the OS (something we can’t entirely control)

Updated by James Turnbull almost 4 years ago

  • Status changed from Unreviewed to Needs More Information

Updated by James Turnbull almost 3 years ago

  • Assignee deleted (Puppet Community)

Updated by Nigel Kersten over 1 year ago

  • Status changed from Needs More Information to Closed
  • Assignee set to Nigel Kersten

If we have more concrete examples that Puppet is doing the wrong thing here, I’m happy for this to get reopened.

As per the below thread, we’re more aggressively closing tickets whose state is unsure, particularly old tickets with little to no inactivity in a long time.

You are free to reopen them.

http://groups.google.com/group/puppet-users/browse_thread/thread/a040cb9bc5c5b647

Also available in: Atom PDF