example42 / puppi

Puppet module to manage applications deployments and servers local management
http://www.example42.com
Other
142 stars 84 forks source link

Error while evaluating a Function Call, undefined method `scope_param' #136

Closed vitxd closed 8 years ago

vitxd commented 8 years ago

Hello, it's probably not a bug but I really can't figure out what's going on here.

I'm trying to use your PHP puppet library which uses params_lookup from this library. This is calling a function called scope_param which apparently is undefined. I don't know much about ruby so I don't know if it's a missing dependency or I'm doing something wrong. Can you please solve this mystery of mine? I would much appreciate

Thanks!

alvagante commented 8 years ago

Are you using the latest version of rhe puppi module? On which OS / Puppet version? Can you provide more details?

vitxd commented 8 years ago

Hello! Yes, I just deleted and cloned the puppi module from github. I'm running puppet version 3.6.2 on a Centos7 linux server. Version of ruby is 2.0.0p598.

I think is probably something I've done wrong as I started writing my puppet script using Puphpet as a template, but I really cannot figure out what!

Let me know if you need any other details.

alvagante commented 8 years ago

Whst's the complete error message? Also can you include your code that uses the php module? Incidentally, puppi functions is params_lookup, I'm not sure from where this scope_params comes out.

vitxd commented 8 years ago

this is the error: default: Running: /var/folders/fv/vk9q1y054jl2p1r_fpc932940000gn/T/vagrant-shell20160404-55906-1nybigk ==> default: Running provisioner: puppet... ==> default: Running Puppet with ... ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/composer/lib/facter/composer_home.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/git/lib/facter/git_exec_path.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/git/lib/facter/git_html_path.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/git/lib/facter/git_version.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/php/lib/facter/php_fact_extension_dir.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/php/lib/facter/php_fact_version.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/puppi/lib/facter/last_run.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/puppi/lib/facter/puppi_projects.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/puppi/lib/facter/windows_common_appdata.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/stdlib/lib/facter/facter_dot_d.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/stdlib/lib/facter/package_provider.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/stdlib/lib/facter/pe_version.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/stdlib/lib/facter/puppet_vardir.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/stdlib/lib/facter/root_home.rb ==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/stdlib/lib/facter/service_provider.rb ==> default: Error: Evaluation Error: Error while evaluating a Function Call, undefined methodscope_param' for #Puppet::Functions::InternalDispatchBuilder:0x00000004da9c20 at /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/php/manifests/init.pp:153:26 on node test-vm.kobas.dev ==> default: Error: Evaluation Error: Error while evaluating a Function Call, undefined method scope_param' for #<Puppet::Functions::InternalDispatchBuilder:0x00000004da9c20> at /tmp/vagrant-puppet/modules-afaee76a50488a8c52b9d33d7ca3018d/php/manifests/init.pp:153:26 on node test-vm.kobas.dev The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

searching in the code for the word scope_param you can find it at line 18 of params_lookup.rb in the puppi module which is the function called at line 153 in init.pp on the php module

alvagante commented 8 years ago

This is strange, scope_params is in the version of params_lookuo which uses Puppet 4 functions api, it's not supposed to be loaded in Puppet 3. Do you have the future parser option enabled by chance? I would try these steps in any case:

vitxd commented 8 years ago

yes! I fixed it upgrading the version of puppet and dropping the future parser! thank you very much for your help and patience!