Issue #1824 has been updated by micah.

It wasn't obvious to me at first, but when we tried to upgrade to 0.24.7, we 
got bit by this bug. This actually resulted in us scratching our heads for some 
time and then downgrading back to 0.24.5. 

We have some modules (such as DavidS' munin module) which depend on this 
function working properly. When it doesn't, nodes fail to compile manifests and 
we get confusingly opaque errors about duplicate definitons, for example:

<pre>
err: Could not retrieve catalog: Puppet::Parser::AST::Resource failed with 
error ArgumentError: Duplicate definition: Munin::Plugin[] is already defined 
in file /etc/puppet/modules/munin/manifests/plugin.pp at line 94; cannot 
redefine at /etc/puppet/modules/munin/manifests/plugin.pp:94 on node
</pre>

----------------------------------------
Bug #1824: passing arrays to custom functions stopped working in 0.24.7
http://projects.reductivelabs.com/issues/1824

Author: marlon
Status: Accepted
Priority: High
Assigned to: luke
Category: functions
Target version: unplanned
Complexity: Unknown
Affected version: 0.24.6
Keywords: 


the custom function:

module Puppet::Parser::Functions
        newfunction(:somefunction, :type => :rvalue) do |args|

        File.open("/tmp/puppet", 'a') { |fd| fd.puts args[0].is_a?(Array) }

        end
end

puppet code:

$array = ["a", "b", "c"]
$useless_var = somefunction($array)

After catting the /tmp/puppet file on the puppetmaster on version 0.24.6 it 
returned True, on 0.24.7 it returned False.


----------------------------------------
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://reductivelabs.com/redmine/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
-~----------~----~----~----~------~----~------~--~---

Reply via email to