Closed bastelfreak closed 5 years ago
I did some further digging and I'm not 100% sure if this issue is related to this module. I had a few other environments laying around that contain the consul module before this was merged: https://github.com/solarkennedy/puppet-consul/pull/456. Puppetserver is still not really good at environment isolation.
@bastelfreak I opened #25 just to rule out our monkey patch.
The only environment isolation issues I've run into with Puppetserver is for custom types/providers and that was solved with generating types for each environment when r10k is run.
Thank you very much for the patch. I am happy to test this tomorrow. R10k is called with --generate-types for each run, so types shouldn't be an issue.
Description of problem
What did you do? I have this module + https://github.com/jsok/puppet-vault/ in my environment. The JSON module within this module seems to conflict.
What happened?
During a puppet run, I get the following error:
to compile into a catalog
It should be enough to do a
include vault
+ having the sensuclassic module in the environment.Command used and debugging output
There is no sensu related config on the affected machine
master
Platform and version information
Anything else to add that you think will be helpful?
The vault module uses
to_json_pretty
from stdlib: https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/functions/to_json_pretty.rb#L75It basically calls
JSON.pretty_generate()
. That method is provided by the default json module from the ruby core lib. My guess is that the module JSON overwrites the class from the core lib.The methods
validate_keys()
,sorted_generate()
andsorted_pretty_generate()
should probably extend the json class or stay within the scope of this module?