Apr 2 21:53:27 integration-slave-precise-1011 puppet-agent[5611]: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Package[gdb] is already declared in file /etc/puppet/modules/java/manifests/tools.pp:10; cannot redeclare at /etc/puppet/modules/base/manifests/standard-packages.pp:38 on node i-00000a44.eqiad.wmflabs
Description
Description
Details
Details
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
operations/puppet | production | +9 -1 | Fix duplicate Package[gdb] declaration |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Krinkle | T94916 Re-create ci slaves (April 2015) | |||
Resolved | Krinkle | T94917 Puppet: "Package[gdb] is already declared in file modules/java/manifests/tools.pp" |
Event Timeline
Comment Actions
you would think the "if ! defined" already protects against this, but apparently not.
if ! defined ( Package['gdb'] ) { package { 'gdb': ensure => present } }
One way to solve it should be to use "ensure_packages" from stdblib.
ensure_packages: Takes a list of packages and only installs them if they don't already exist.
Comment Actions
Change 201598 had a related patch set uploaded (by Krinkle):
Fix duplicate Package[gdb] declaration
Comment Actions
Out of the four precise instances Timo created, only one has the problem: integration-slave-precise-1011 which has the puppet class role::ci::slave::labs
Precise instances having an older image of Precise does not have the issue though.
Comment Actions
I had it cherry picked on the integration puppet master and that definitely solved the issue. Thanks for the merge!