-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
Broken JSON module #452
Comments
@solarkennedy can you please verify or prove me wrong? 😃 |
Hi @shamil, do you run in a particular issue? If so which version of puppet/ruby do you use and how do you call the module? I use the latest version in production and it works well. |
Hi @bastelfreak , The module itself works well, but it cause problems to other puppet functions that make use of For example, the following will throw exception, something about no require 'json'
Puppet::Functions.create_function(:test_func) do
def test_func
JSON.parse('{"foo": "bar"}')
end
end If I revert consul module to previous version, the above function works ! |
Huh. Can you confirm again exactly what version fo ruby+puppet you are using? |
@solarkennedy yes, that what I meant when mentioning about #444, you extending I'm running puppet |
I think I just run into this error while using this module + the vault module:
|
@bastelfreak, exactly same issue I'm experiencing. If you downgrade the consul module everything will work as expected |
@bastelfreak any news about this? Do you need me to provide any other information? |
same here UPD: error output {
"changed":false,
"disabled":false,
"error":true,
"msg":"puppet did not run",
"rc":1,
"stderr":"Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, undefined method `pretty_generate' for Puppet::Pops::Loader::RubyFunctionInstantiator::JSON:Module\nDid you mean? pretty_print (file: /etc/puppetlabs/code/environments/production/modules/myconsul/manifests/service/logist.pp, line: 44, column: 16) on node i-069fb1137abb7b1e4.logist.aws.intra.com\nWarning: Not using cache on failed catalog\nError: Could not retrieve catalog; skipping run\n",
"stderr_lines":[
"Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, undefined method `pretty_generate' for Puppet::Pops::Loader::RubyFunctionInstantiator::JSON:Module",
"Did you mean? pretty_print (file: /etc/puppetlabs/code/environments/production/modules/myconsul/manifests/service/logist.pp, line: 44, column: 16) on node i-069fb1137abb7b1e4.logist.aws.intra.com",
"Warning: Not using cache on failed catalog",
"Error: Could not retrieve catalog; skipping run"
],
"stdout":"Info: Using configured environment 'production'\nInfo: Retrieving pluginfacts\nInfo: Retrieving plugin\nNotice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/functions/consul]/ensure: removed\nNotice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/parser/functions/consul_sorted_json.rb]/ensure: defined content as '{md5}687479319754f1bedcb84566be25ea5d'\nNotice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/parser/functions/consul_validate_checks.rb]/ensure: defined content as '{md5}e1aa7f61ef9af1ace825b25db4ccb039'\nInfo: Loading facts\n",
"stdout_lines":[
"Info: Using configured environment 'production'",
"Info: Retrieving pluginfacts",
"Info: Retrieving plugin",
"Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/functions/consul]/ensure: removed",
"Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/parser/functions/consul_sorted_json.rb]/ensure: defined content as '{md5}687479319754f1bedcb84566be25ea5d'",
"Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/parser/functions/consul_validate_checks.rb]/ensure: defined content as '{md5}e1aa7f61ef9af1ace825b25db4ccb039'",
"Info: Loading facts"
]
} |
Hi, Puppet 4.8 |
With latest version (5.x) of this module I can't any longer use
JSON
module.Seems like after #444 the
JSON
module is no longer usable outside theconsul::sorted_json
function.Seems like overriding modules with The modern Ruby functions API causing problems.
The text was updated successfully, but these errors were encountered: