I''m getting the following error from my nagios module (which worked in earlier versions of puppet but I''m just getting around to testing it under 24.4) err: Could not retrieve catalog: Exported resource File[service:SSH] cannot override local resource on node The error and a corresponding trace from the puppetmaster: http://pastie.org/174912 Here''s the define in question: define nagios::service ( $nagios_template = ''generic-service'', $host_name = $fqdn, $service_groups = '''', $contact_groups = $default_contact_group, $max_check_attempts = 3, $dependency = false, $dependent_host = $fqdn, $dependent_services = '''', $escalation_groups = [], $escalation_stages = [ 7, 10 ], $check_command = '''' ) { $contacts = [] # leave this blank @@file { "service:${name}": name => "/etc/nagios/conf.d/services/${fqdn}_${name}.cfg", mode => 0644, owner => nagios, group => nagios, tag => nagios, notify => Service["nagios"], content => template("nagios/service.erb"), } } I call my define like so: nagios::service { SSH: check_command => "check_ssh", } And here''s the collection: File <<| tag == nagios|>> I''m not real sure how else to start debugging this particular problem. It doesn''t trace on the client, I''m assuming b/c the configuration doesn''t compile yet. debug doesn''t show anything helpful. Anyone have any ideas? C -- stickm@gmail.com -==< Stick >==- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Apr 3, 2008, at 6:16 PM, Chris MacLeod wrote:> I''m not real sure how else to start debugging this particular > problem. It doesn''t trace on the client, I''m assuming b/c the > configuration doesn''t compile yet. debug doesn''t show anything > helpful. > > Anyone have any ideas?The problem here is that Puppet thinks it''s getting two resources with the same name -- one from another host, one from the current host. There have been some versions where that was bug, but it''s not one right now. Most likely, because the exported resource does not have the host''s name in it, you''ve got the same resource with the same name from multiple hosts. You could connect to your db and look at the resources table, seeing how many resources you have with that name. -- While one person hesitates because he feels inferior, the other is busy making mistakes and becoming superior. -- Henry C. Link --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ok, the way I''m using my define I''m redefining name to include the fqdn (which should be make it unique) @@file { "service:${name}": name => "/etc/nagios/conf.d/services/${fqdn}_${name}.cfg", does the invocation of the type need to ensure uniqueness? something like: nagios::service { "$fqdn-SSH": } Like I said this method had worked in the 23.x series I just hadn''t tested it yet on the 24.x (till now) C On 4/4/08, Luke Kanies <luke@madstop.com> wrote:> > > On Apr 3, 2008, at 6:16 PM, Chris MacLeod wrote: > > > I''m not real sure how else to start debugging this particular > > problem. It doesn''t trace on the client, I''m assuming b/c the > > configuration doesn''t compile yet. debug doesn''t show anything > > helpful. > > > > Anyone have any ideas? > > > > The problem here is that Puppet thinks it''s getting two resources with > the same name -- one from another host, one from the current host. > > There have been some versions where that was bug, but it''s not one > right now. Most likely, because the exported resource does not have > the host''s name in it, you''ve got the same resource with the same name > from multiple hosts. > > You could connect to your db and look at the resources table, seeing > how many resources you have with that name. > > -- > While one person hesitates because he feels inferior, the other is > busy making mistakes and becoming superior. -- Henry C. Link > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > > >-- stickm@gmail.com -==< Stick >==- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Apr 4, 2008, at 10:36 AM, Chris MacLeod wrote:> ok, the way I''m using my define I''m redefining name to include the > fqdn (which should be make it unique) > > > @@file { "service:${name}": > name => "/etc/nagios/conf.d/services/${fqdn}_$ > {name}.cfg", > > > does the invocation of the type need to ensure uniqueness? > > > something like: > > > nagios::service { "$fqdn-SSH": } > > > Like I said this method had worked in the 23.x series I just hadn''t > tested it yet on the 24.x (till now)0.24.4 introduced a change in behaviour in how virtual or exported defined types are handled -- previously, the types would be expanded into multiple exported or virtual resources, but now, the individual exported resource is stored in the db in an unexpanded form. It looks like your defined type (nagios::service) is not exported, but that it contains exported resources, so maybe this isn''t the problem. If this is the problem, note that there was a filed bug (now closed as ''wontfix'') and a thread on this topic recently. -- If all the world''s a stage, I want to operate the trap door. -- Paul Beatty --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---