On Thursday, January 9, 2014 3:59:17 AM UTC-6, Krist van Besien wrote:
>
> Hello all,
>
> I am configuring a openstack swift cluster using puppet. For this I use 
> exported resources, and here I run in to a problem...
>
> I'm getting an error like this:
>
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Another local or imported resource exists with the type and title 
> Swift::Ringsync[account] on node dc2-05
>
> Thought I could solve this by purging the exported resources, like 
> described here:
>
> https://ask.puppetlabs.com/question/88/how-can-i-purge-exported-resources-from-puppetdb/
>
> However this did not do anything. It didn't even change the behaviour of 
> puppet on my node in any way.
>
> Am I wrong in my assumptions on what causes this problem?
>


Stale exported resources could contribute to such a problem, but they would 
not really the root cause, and they might not be a cause at all.

 

> If so, what is the real cause and what do I do about it?
>
>

The error message says that the problem is two distinct declarations of a 
resource "Swift::Ringsync[account]".  The most likely cause is that you are 
both collecting that resource and declaring it locally for the same node.  
For example you may be doing something like this:

swift::ringsync { 'account': 
  # properties
}

Swift::Ringsync <<| |>>

where some node has exported a Swift::Ringsync['account'].

Purging exported resources would normally be an effective -- albeit not 
necessarily correct -- solution to such a problem, at least for one run.  
If purging doesn't solve the problem even temporarily then it's likely that 
the node in question is the one exporting the resource, too.  In that case 
the correct solution would be for the node to rely on collecting the 
resource it itself exported instead of redeclaring it as a local resource:

# This exported resource assumed already present
@@swift::ringsync { 'account': 
  # properties
}

# Removed the local redeclaration of Swift::Ringsync['account']

# Still want to collect all these,
# including those declared by this node:
Swift::Ringsync <<| |>>


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5ae89ed0-72bd-4009-bbb1-993d9a5ff9a4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to