sensu / puppet-module-sensuclassic

Puppet module to manage Sensu Classic (ruby version)
MIT License
0 stars 11 forks source link

sensuclassic_sorted_json #21

Closed bastelfreak closed 5 years ago

bastelfreak commented 5 years ago

Description of problem

I use this module on a Puppetserver 6.5.0 environment

During an agent run, I get the following error message:

...
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Internal Server Error: org.jruby.exceptions.SecurityError: (SecurityError) Illegal method definition of method 'validate_keys' on line 8' in legacy function. See https://puppet.com/docs/puppet/latest/functions_refactor_legacy.html for more information
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

I expected a function that doesn't use the legacy 3.x Puppet API.

I will try to post a minimale example later. Everything that uses the sensuclassic_sorted_json() method will produce this error.

Command used and debugging output

Platform and version information

Anything else to add that you think will be helpful?

The metadata.json mentions that this module supports Puppet 6. The tests work, but the code clearly matches the described one in the error article at https://puppet.com/docs/puppet/latest/functions_refactor_legacy.html. I don't yet understand why the tests work.

bastelfreak commented 5 years ago

I did some debugging and noticed that we don't really use the master branch of this module but a strange patched version. I cleaned that up and tested it again with the last release 3.3.0 and master. The issue is fixed and doesn't reappear.