Hi David,

Thanks. That was indeed the case.

The "ruby -rpuppet" just proved to me that the custom functions we're not
parsed correctly in puppet either (no helpful errors even there though).
Once I added the reset, all started working fine inside puppet too.

Thanks a lot!

Regards,
Karolis


On 18 May 2014 12:28, David Schmitt <[email protected]> wrote:

> On 2014-05-16 14:46, Karolis Pabijanskas wrote:
>
>> Hi All,
>>
>> I'm having issues with what seems to be incorrect parsing by all the
>> custom functions we have.
>>
>> If I run "ruby -rpuppet" I get something like:
>>
>> [root@puppet modules]# ruby -rpuppet
>> /var/lib/puppet/lib/puppet/parser/functions/foreman.rb
>> /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:242:in
>> `merged_functions': undefined method `[]' for nil:NilClass (NoMethodError)
>> from /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:247:in
>> `get_function'
>> from /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:132:in
>> `newfunction'
>> from /var/lib/puppet/lib/puppet/parser/functions/foreman.rb:38
>>
>> This exact error appears on every single custom function, including all
>> the stdlib ones (naturally, only the last line differs slightly)
>>
>> The 38th line in the foreman.rb file is the newfunction call:
>>
>> module Puppet::Parser::Functions
>>    newfunction(:foreman, :type => :rvalue) do |args|
>>
>> Nothing further gets called ever, on any of the functions.
>>
>> I had a quick look through those libraries, but as I'm not a ruby black
>> belt, this seems a bit beyond me.
>>
>> Does anyone have any idea what could be causing this, or could point me
>> where to look at for further torubleshooting?
>>
>> Note, this is apparent on both puppet 3.5.1 and 3.6, ruby 1.8.7 (from
>> centos repositories).
>>
>
> From my cursory reading of the functions.rb, your "ruby -rpuppet" call
> seems to be missing a call to "Puppet::Parser::Functions#reset". I'm not
> sure why you would expect the ruby call to work out?
>
>
> Regards, David
>
> --
> 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/5378996E.8030606%40dasz.at.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CANYNSSJg80KPF6pY9xXwv011Us%2Bq3VtWaCk%2BHnUrnTNXCSEsFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to