-
Notifications
You must be signed in to change notification settings - Fork 84
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
[Puppet4] hiera() has been converted to 4x API #123
Comments
Uhm, have definitively to double check this |
I'm also having the same problem running the example42/jboss module. The various hiera functions seemed to change in this commit and again here. Looks like the main issue is just that the package that the function is in has changed - but I don't have the ruby skills to work out what it should look like instead. I'll include the back trace in case it helps:
|
Can you test if this works on Puppet 4? (won't work on Puppet 3, just to validate if it's enough what has been done there) |
Thanks for that (and for the super-quick turnaround), I now get a different error:
Looking at this suggests to me that it should now be in a package something like Tested on puppet open source 4.0.0. |
Made another blind attempt (can't check this now directly), please pull from 4xcompat branch and let me know. |
Getting rid of the |
I'm also getting the same error for example42/mysql. |
I've started to work on a 4x version of params_lookup, you can see it here:
|
👍 For this issue being addressed. This is a major killer for upgrading to 4.0 |
Yes I know and agree. Quick help in getting the module name here would be welcomed https://github.com/example42/puppi/blob/4xcompat/lib/puppet/functions/params_lookup.rb#L30 |
An update, I fixed some lookups here e42aefa |
Asking to puppet-dev has had immediate results. |
Fix for #123 Puppet4 compatibility of params_lookup
params_lookup works on Puppet 4 now. |
Hello Alvagante, I've tired your workaround(https://github.com/example42/puppi/blob/master/lib/puppet/functions/params_lookup.rb), but "hiera() has been converted to 4x API" still there. Exact error is: Info: Retrieving pluginfacts Is this problem solved or its still in progress? Or Im missing something? BR, |
I have feeling, that the old params_lookup.rb is cached somewhere. I have totally removed it from the system, but it still tries to call hiera() starting from the $db_host = params_lookup( 'db_host' ). Still same error... Regards, |
Did you run puppet on the master? Functions are evaluated on the master at catalog compile time. |
Yes, I have master, puppetdb and agent on the same machine. Regards, |
I removed module and dependencies, compiled catalog on master without dashboard module - OK so far... Then I restarted puppet master and puppetdb, compiled catalog again - still OK. Installed module again and without compiling replaced content of the params_lookup.rb file with: https://github.com/example42/puppi/blob/master/lib/puppet/functions/params_lookup.rb . After running puppet agent -t it shows new error: Info: Retrieving pluginfacts So function is not recognized. Regards, |
What do you mean by: "replaced content of the params_lookup.rb" So procedure should be:
If you still have problems , please send me the output of facter for both master and clients. |
Ok, seems that solvses it. But now Ive got new error: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Failed to parse template puppetdashboard/default-workers.init-ubuntu: It refers to: and Seems that it cant get processorcount. Regards, |
OK, this one solved - "@" was missing: New challange: Error: Failed to apply catalog: Parameter source failed on File[mysql.dir]: Cannot use relative URLs '' at /etc/puppetlabs/code/environments/production/modules/mysql/manifests/init.pp:427 The whole mysql configuration directory can be recursively overridenif $mysql::source_dir { |
@wooziethe - with all due respect, it doesn't look like the issues you are now having are related to puppi. @alvagante apologies for going silent on this - I've been really busy recently. I'll try and have a look this evening to check this fixes my issues. |
ball-hayden, the last issue is related to puppi, because file 'mysql.dir': deals with params_lookup function, which does not return expected values. $config_dir = params_lookup( 'config_dir' ),
} Regards, |
@wooziethe try to set this line to false instead of '': |
Yes, this helped, but mysql installation went wrong. But this is another story... |
When can we expect a new release on Forge with the v4 compatibility? |
Check for Version 2.1.12 on the Forge. |
dear @alvagante , sorry to misuse this thread but I wonder why the puppet4 params_lookup doesn't support defining defaults anymore. Is there a special reason? |
@mklette possibly some left over, can you be more precise about defaults support? |
sorry, I was wrong: I looked at the customised version we use which has been extended with some 'interesting' mechanisms to allow a signature of |
I still have issue with puppet 4.8.1 Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, hiera() can only be called using the 4.x function API. See Scope#call_function at /etc/puppetlabs/puppet/tenants/tetcoreweb_tenant/modules/splunk/manifests/init.pp:197:26 |
Please provide some context. Eventually open a new ticket. |
while using splunk module "example42/splunk". I get the following error It is erroring out at params_lookup function as it is not available in splunk module. I manually copied it from puppi module into splunk module and it seems to work. |
yes params_lookup function is provided by puppi module, you should have the latest version of puppi in your modulepath in order to use the splunk module (and most of the other (now old) modules of example42) |
@alvagante Latest version of puppi with latest tagged release of monit (v2.0.18) and getting these same errors. |
@cdenneen The monit module is no more actively maintained but the error seems actually related to and old version of params_lookup used somewhere. Note that params_lookup function which works with Puppet4 is: |
This was from rspec testing run.
So latest was downloaded to fixtures during run.
…On Tue, Mar 14, 2017 at 7:30 AM Alessandro Franceschi < ***@***.***> wrote:
@cdenneen <https://github.com/cdenneen> The monit module is no more
actively maintained but the error seems actually related to and old version
of params_lookup used somewhere.
Please try to look in your module path if you have older versions of
params_lookup, the one in the current puppi module. (which actually seems
the one you are using) should work. If not, please ping me back.
Note that params_lookup function which works with Puppet4 is:
lib/puppet/functions/params_lookup.rb
the one for older Puppet function API is:
lib/puppet/parser/functions/params_lookup.rb
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#123 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAr84SEcE6-0eaSTwstG3iN3tzAXLIjUks5rlnpSgaJpZM4EPVz->
.
|
The one from the older Puppet function API is used, however. I have the same problem and I can make the Puppet agent run by replacing the lines inside
(it works far from perfectly because module_name refers to the topmost module - which is called "profile" where I currently use it even if the params_lookup call is inside a class in another module) |
With puppet 4, I'm getting the following error when using the 'example42/resolver' module:
Line 128 reads as follows:
which suggests the error is in params_lookup.
I assume this is being caused by the
function_hiera
, although I can't find any documentation to suggest what should be used instead.The text was updated successfully, but these errors were encountered: