duplicate resource was found while collecting exported resources

asked 2015-10-05 23:48:16 -0600

campee gravatar image

I'm trying to replace one of three Puppet master servers in an environment that I have recently inherited. The environment is using PuppetDB and exported resources that are then collected and used by the 'concat' module. After re-installing the OS for the Puppet master, I attempted to run Puppet using the following command to apply the Puppet catalog:

/usr/bin/puppet agent --onetime --verbose --ignorecache --no-daemonize --no-usecacheonfailure --detailed-exitcodes --no-splay

I received this error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: A duplicate resource was found while collecting exported resources, with the type and title Concat::Fragment[puppetmaster_crl] on node puppet2.dr1.domain.net

Warning: Not using cache on failed catalog

Error: Could not retrieve catalog; skipping run

Other than re-creating this host, there have been no changes to the environment, modules, or PuppetDB. The other two Puppet master servers can still run Puppet without issue.

Thinking that the issue was likely stale data in PuppetDB, I searched and saw the following recommended steps to get rid of the old data for this host:

$ puppet node deactivate puppet2.dr1.domain.net

Submitted 'deactivate node' for puppet2.dr1.domain.net with UUID 066add72-6b64-486a-81e8-17a379d875de

$ puppet node clean puppet2.dr1.domain.net Notice: Revoked certificate with serial 40 Notice: Revoked certificate with serial 41 Notice: Revoked certificate with serial 295 Notice: Revoked certificate with serial 296 puppet2.dr1.domain.net

I also tried the '--unexport' option:

$ puppet node clean puppet2.dr1.domain.net --unexport Notice: Revoked certificate with serial 40 Notice: Revoked certificate with serial 41 Notice: Revoked certificate with serial 295 Notice: Revoked certificate with serial 296 puppet2.dr1.domain.net

I tried the 'puppet apply' command from before. I get the same error.

I noticed that if I run the following command on one of the Puppet masters:

$ puppet node find puppet2.dr1.domain.net --render-as yaml

I still see quite a bit of information on this host and it's out of date information (the old IP address, the old EC2 instance size, etc)

Short of going into PuppetDB using the psql client, is there anything else that I can try?

And if psql is the only option (as I've seen in some other places), what SQL command would I run to purge all information about this node?

Thank you!

Versions: Puppet/Puppetmaster: 3.7.4-1puppetlabs1

PuppetDB: 2.3.3-1puppetlabs1

OS: Debian 7.7, "Wheezy"

edit retag flag offensive close merge delete

Comments

No one? =/

campee gravatar imagecampee ( 2015-10-09 15:48:53 -0600 )edit