Issue #3420 has been updated by Bruno Leon.
There is a regression in 2.7.1:
diff ./puppet-2.6.9/lib/puppet/provider/naginator.rb
./puppet-2.7.1/lib/puppet/provider/naginator.rb
33,41c33
< header + records.collect { |record|
< # Remap the TYPE_name or _naginator_name params to the
< # name if the record is a template (register == 0)
< if record.to_s =~ /register\s+0/
< record.to_s.sub("_naginator_name",
"name").sub(record.type.to_s + "_name", "name")
< else
< record.to_s.sub("_naginator_name", NAME_STRING)
< end
< }.join("\n")
---
> header + records.collect { |record| record.to_s
}.join("\n").gsub("_naginator_name", NAME_STRING)
zsh: exit 1 diff ./puppet-2.6.9/lib/puppet/provider/naginator.rb
Obviously the patch was not merged in 2.7.1
----------------------------------------
Bug #3420: Nagios "name" attribute not output correctly
https://projects.puppetlabs.com/issues/3420
Author: Robin Skoglund
Status: Merged - Pending Release
Priority: Normal
Assignee: Nigel Kersten
Category: nagios
Target version: 2.6.x
Affected Puppet version: 2.6.6
Keywords:
Branch: https://github.com/jamtur01/puppet/tree/tickets/2.6.x/3420
I think I've stumbled upon a bug in the way Naginator outputs the Nagios "name"
attribute.
I have the following `nagios_service` type defined in a manifest:
<pre>
nagios_service { "jmx-${name}":
use => "basic-service",
service_description => "JMX $name",
check_command => "check_jmx_heap_via_ssh!$name",
register => "0",
target => "/usr/local/nagios/etc/generated_services/$name.cfg"
}
</pre>
Expected output:
<pre>
define service {
check_command check_jmx_heap_via_ssh!kidkalkulator
register 0
name jmx-kidkalkulator
service_description JMX kidkalkulator
use basic-service
}
</pre>
Actual output:
<pre>
define service {
check_command check_jmx_heap_via_ssh!kidkalkulator
register 0
## --PUPPET_NAME-- (called '_naginator_name' in the manifest)
jmx-kidkalkulator-test
service_description JMX kidkalkulator
use basic-service
}
</pre>
I attached a patch that changes `puppet/provider/naginator.rb` to output as
expected, but I am not sure whether the patch will break other parts of
Naginator/puppet.
--
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.