Issue #5429 has been updated by Mark Frost.
I'm having this same issue in Puppet 2.7.9, Ruby version 1.9.2p290. As near as
I can tell, this makes run stages completely unusable.
Everything for me is as the original reporter describes it, except that I'm not
even having the first run be a success. For me, the failures happen every time
I run puppet, all of the time.
Here's my setup for the issue, which is slightly different from the reporter's:
class icinga::configs {
[actual class definition removed]
}
In my site.pp:
stage { "pre": before => Stage["main"] }
stage { "post": after => Stage["main"] }
...
node "xxicinga01" inherits xxbase {
class { 'icinga::configs': stage => 'pre' }
}
If there's a work-around for this, or an alternate format that makes Run Stages
usable again, I'd like to know.
----------------------------------------
Bug #5429: Inconsistent "Duplicate definition" error
https://projects.puppetlabs.com/issues/5429
Author: Juerg Walz
Status: Accepted
Priority: Normal
Assignee:
Category: stages
Target version:
Affected Puppet version: 2.6.3
Keywords: duplicate definition stages
Branch:
The following error occurs when I run the Puppet agent a second time after
restarting the Puppet Master (running it for the first time after the restart
works successfully):
# puppet agent --test
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Duplicate definition: Class[Yum::Os] is already defined; cannot redefine at
/etc/puppet/modules/csdev/yum/manifests/os.pp:100 on node puppet.example.com
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
# service puppetmaster restart
Stopping puppetmaster: [ OK ]
Starting puppetmaster: [ OK ]
# puppet agent --test
info: Caching catalog for puppet.example.com
info: Applying configuration version '1291183870'
notice: Finished catalog run in 11.80 seconds
# puppet agent --test
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Duplicate definition: Class[Yum::Os] is already defined; cannot redefine at
/etc/puppet/modules/csdev/yum/manifests/os.pp:100 on node puppet.example.com
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
The agent and master are running on the same system.
No changes to the configuration were made during this process.
The problem appears to be with the Run Stages configuration. Here are the
important bits from yum/manifests/os.pp (line 100 is the closing bracket of the
"second" class block):
class yum::os {
[actual class definition removed]
}
include stages
class { 'yum::os' :
stage => 'package-manager-setup',
}
And the Run Stages definition:
class stages {
stage { 'package-manager-setup' : before => Stage['main'], }
}
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.