Tore
2010-Apr-06 14:00 UTC
[Puppet Users] Exported resource [...] cannot override local resource - Common error, how to get around
Hi, I''ve runned into a fairly common problem: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Exported resource File[list-updates] cannot override local resource on node X http://projects.puppetlabs.com/projects/puppet/wiki/Frequently_Asked_Questions I cannot see how I can fix this. On all of my nodes i add the class "list-updates", and on the puppetmaster i add "list-updates" AND "list- updates::all". The manifests: http://pastebin.com/vXqP2q6q Of course this can be prevented by not including "list-updates" on the puppetmaster. But, this problems occours since the puppetmaster creates and uses an stored configuration. But why doesn''t this pose a problem when using sshkeys? http://projects.reductivelabs.com/projects/puppet/wiki/Exported_Resources -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken
2010-Apr-06 22:25 UTC
[Puppet Users] Re: Exported resource [...] cannot override local resource - Common error, how to get around
You''ve got to think about it from the servers perspective ... its going to see many File["list-update"] resources ... one for each machine in fact. Which is why you''re getting that error. Each machines definition is trying to overwrite the other: @@file { "list-updates": ensure => present, path => "/opt/puppet/list-updates/${fqdn}", source => "file:///tmp/puppet-list-updates", backup => false, } File <<| title == "list-updates" |>> The name of the resource needs to be unique when being imported, so I''d change your configuration to use the path as the name because in your case it _is_ going to be unique because of the fqdn var. Then search for tags for instead for the import. For example: @@file { "/opt/puppet/list-updates/${fqdn}": ensure => present, source => "file:///tmp/puppet-list-updates", backup => false, tag => "foo" } And then on the server use: File <<| tag == "foo" |>> ken. On Apr 6, 3:00 pm, Tore <tore.lo...@gmail.com> wrote:> Hi, > > I''ve runned into a fairly common problem: > err: Could not retrieve catalog from remote server: Error 400 on > SERVER: Exported resource File[list-updates] cannot override local > resource on node Xhttp://projects.puppetlabs.com/projects/puppet/wiki/Frequently_Asked_... > > I cannot see how I can fix this. On all of my nodes i add the class > "list-updates", and on the puppetmaster i add "list-updates" AND "list- > updates::all". > > The manifests:http://pastebin.com/vXqP2q6q > > Of course this can be prevented by not including "list-updates" on the > puppetmaster. But, this problems occours since the puppetmaster > creates and uses an stored configuration. But why doesn''t this pose a > problem when using sshkeys?http://projects.reductivelabs.com/projects/puppet/wiki/Exported_Resou...-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Tore
2010-Apr-07 06:13 UTC
[Puppet Users] Re: Exported resource [...] cannot override local resource - Common error, how to get around
Ah of course! I were testing this first with one node, then on the puppetmaster I added File <<| title == "list-updates" |>>, which of course is acceptable since it only sees one File[X] resource, but when i added the list-updates class on the puppetmaster, it sees two. Thanks alot Ken :) On 7 apr, 00:25, Ken <k...@bob.sh> wrote:> You''ve got to think about it from the servers perspective ... its > going to see many File["list-update"] resources ... one for each > machine in fact. Which is why you''re getting that error. Each machines > definition is trying to overwrite the other: > > @@file { "list-updates": > ensure => present, > path => "/opt/puppet/list-updates/${fqdn}", > source => "file:///tmp/puppet-list-updates", > backup => false, > > } > > File <<| title == "list-updates" |>> > > The name of the resource needs to be unique when being imported, so > I''d change your configuration to use the path as the name because in > your case it _is_ going to be unique because of the fqdn var. Then > search for tags for instead for the import. > > For example: > > @@file { "/opt/puppet/list-updates/${fqdn}": > ensure => present, > source => "file:///tmp/puppet-list-updates", > backup => false, > tag => "foo" > > } > > And then on the server use: > > File <<| tag == "foo" |>> > > ken. > > On Apr 6, 3:00 pm, Tore <tore.lo...@gmail.com> wrote: > > > Hi, > > > I''ve runned into a fairly common problem: > > err: Could not retrieve catalog from remote server: Error 400 on > > SERVER: Exported resource File[list-updates] cannot override local > > resource on node Xhttp://projects.puppetlabs.com/projects/puppet/wiki/Frequently_Asked_... > > > I cannot see how I can fix this. On all of my nodes i add the class > > "list-updates", and on the puppetmaster i add "list-updates" AND "list- > > updates::all". > > > The manifests:http://pastebin.com/vXqP2q6q > > > Of course this can be prevented by not including "list-updates" on the > > puppetmaster. But, this problems occours since the puppetmaster > > creates and uses an stored configuration. But why doesn''t this pose a > > problem when using sshkeys?http://projects.reductivelabs.com/projects/puppet/wiki/Exported_Resou...-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.