Issue #5429 has been updated by Nick Fagerlund.

Status changed from Accepted to Closed

I'm closing this because I don't think it describes a reproducible bug. The 
code in the original report is insufficient to reproduce the problem, and the 
symptom is consistent with trying to use a [resource-like class 
declaration](http://docs.puppetlabs.com/puppet/3/reference/lang_classes.html#include-like-vs-resource-like)
 after an include-like declaration was already used somewhere else. This is a 
more likely explanation. 

If anyone has more information that can help reproduce the problem and 
demonstrate that it isn't caused by an error in the manifests, please re-open 
this issue. 
----------------------------------------
Bug #5429: Inconsistent "Duplicate definition" error
https://projects.puppetlabs.com/issues/5429#change-77992

Author: Juerg Walz
Status: Closed
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.

Reply via email to