Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

params_lookup and puppet 3 #40

Closed
janorn opened this issue Apr 10, 2013 · 7 comments
Closed

params_lookup and puppet 3 #40

janorn opened this issue Apr 10, 2013 · 7 comments

Comments

@janorn
Copy link

janorn commented Apr 10, 2013

When using these modules on Puppet ver 3 I get these errors:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: custom functions must be called with a single array that contains the arguments. For example, function_example([1]) instead of function_example(1) at /etc/puppet/modules/resolver/manifests/init.pp:148 on node puppetclient

@alvagante
Copy link
Member

I'm not able to reproduce the error (https://travis-ci.org/example42/puppet-dhcpd)
Can you give more details on the environment and be sure to have the modules updated (especially the puppi one)?

@janorn
Copy link
Author

janorn commented Apr 12, 2013

I have two environments. Both Solaris.

First it works in this environment.
Master Solaris 11 Puppet 2.7.21
Client Solaris 10 Puppet 2.7.20

The problematic setup is a clone of the master which has been upgraded.
Master Solaris 11 Puppet 3.1.1
Client Solaris 10 Puppet 2.7.20

Modules:
puppi last commit "Date: Wed Apr 10 03:30:13 2013 -0700"
resolver last commit "Date: Sat Mar 9 00:09:50 2013 +0100"

@janorn
Copy link
Author

janorn commented Apr 25, 2013

Have you been able to reproduce this?

@alvagante
Copy link
Member

Sorry, no.
I've not an easily testable Solaris box at disposal (if you know an url or can provide a Solaris10/11 Vagrant base box that would help a lot, having Solaris boxes here https://github.com/example42/puppet-playground would help a lot the support for Solaris ).
What I can say is that the problem seems related to the params_lookup function (provided by the Puppi module and used in all example42 modules for any parameter assed to the main class) and that a somehow related issue (not using arrays inside functions) was fixed on Puppi when Puppet 3 was released (so is surely covered by your puppi version).

I tested on a Puppet 3.1.1 (on Linux) without problems.
Just a question: do you have the same problem with both client and server at 3.1.1?

The issue is potentially serious anyway, because params_lookup is at the core or Example42 modules, so this has to be investigaed.

Can you try some changes on the first line of the resolver where params_lokup is used and see if the error "shitfs" to the following line:
Instead of:

  $dns_domain          = params_lookup( 'dns_domain' , 'global' ),

try:

  $dns_domain          = params_lookup( ['dns_domain' , 'global'] ),

or

  $dns_domain          = params_lookup( ['dns_domain'] , ['global'] ),

and let me know if:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: custom functions must be called with a single array that contains the arguments. For example, function_example([1]) instead of function_example(1) at /etc/puppet/modules/resolver/manifests/init.pp:148 on node puppetclient

becomes:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: custom functions must be called with a single array that contains the arguments. For example, function_example([1]) instead of function_example(1) at /etc/puppet/modules/resolver/manifests/init.pp:149 on node puppetclient

@janorn
Copy link
Author

janorn commented Apr 25, 2013

I will look into this next week.

@janorn
Copy link
Author

janorn commented Apr 30, 2013

I can not reproduce this anymore either. Strange.

@alvagante
Copy link
Member

Well, suppose (and hope) I can close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants