-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
hiera-eyaml doesn't play nice with heira_hash() 3.2.3 #65
Comments
I upgraded my server to 3.4.2 and hiera_hash() still fails. |
This is an attempt to get deep_merge's working, which are currently throwing exceptons in my testing environment. See [this issue](voxpupuli#65). I copied the yaml_backend from hiera v1.2.1, which is the one used in puppet v3.4.2, and injected the decryption mechanics. I also needed to copy the `parse_answer` method from the `::Hiera::Backend` and modified it to use the decryption aware version of `parse_string`. It's still an unfortunately long implementation considering that the only real difference between the eyaml backend and the yaml backend is the change to `::Heira::Backend.parse_string` that allows it to process encrypted values. I feel like this backend could be trimmed down so that it inherits from the yaml backend, but the issues with doing that are tricky enough to solve that I'm not going to pursue it at this point.
This is an attempt to get deep_merge's working, which are currently throwing exceptons in my testing environment. See [this issue](voxpupuli#65). I copied the yaml_backend from hiera v1.2.1, which is the one used in puppet v3.4.2, and injected the decryption mechanics. I also needed to copy the `parse_answer` method from the `::Hiera::Backend` and modified it to use the decryption aware version of `parse_string`. It's still an unfortunately long implementation considering that the only real difference between the eyaml backend and the yaml backend is the change to `::Heira::Backend.parse_string` that allows it to process encrypted values. I feel like this backend could be trimmed down so that it inherits from the yaml backend, but the issues with doing that are tricky enough to solve that I'm not going to pursue it at this point.
@larryfast, my current master is working for me with puppet 3.4.2. You're welcome to test it out. Just clone the repo and build/install it yourself, i.e. cd /tmp
git clone https://github.com/devin-c/hiera-eyaml.git
cd hiera-eyaml
bundle
bundle exec rake install Let me know if you run into issues. |
This is an attempt to get deep_merge's working, which are currently throwing exceptons in my testing environment. See [this issue](voxpupuli#65). I copied the yaml_backend from hiera v1.2.1, which is the one used in puppet v3.4.2, and injected the decryption mechanics. I also needed to copy the `parse_answer` method from the `::Hiera::Backend` and modified it to use the decryption aware version of `parse_string`. It's still an unfortunately long implementation considering that the only real difference between the eyaml backend and the yaml backend is the change to `::Heira::Backend.parse_string` that allows it to process encrypted values. I feel like this backend could be trimmed down so that it inherits from the yaml backend, but the issues with doing that are tricky enough to solve that I'm not going to pursue it at this point.
This is an attempt to get deep_merge's working, which are currently throwing exceptons in my testing environment. See [this issue](voxpupuli#65). I copied the yaml_backend from hiera v1.2.1, which is the one used in puppet v3.4.2, and injected the decryption mechanics. I also needed to copy the `parse_answer` method from the `::Hiera::Backend` and modified it to use the decryption aware version of `parse_string`. It's still an unfortunately long implementation considering that the only real difference between the eyaml backend and the yaml backend is the change to `::Heira::Backend.parse_string` that allows it to process encrypted values. I feel like this backend could be trimmed down so that it inherits from the yaml backend, but the issues with doing that are tricky enough to solve that I'm not going to pursue it at this point.
This is an attempt to get deep_merge's working, which are currently throwing exceptons in my testing environment. See [this issue](voxpupuli#65). I copied the yaml_backend from hiera v1.2.1, which is the one used in puppet v3.4.2, and injected the decryption mechanics. I also needed to copy the `parse_answer` method from the `::Hiera::Backend` and modified it to use the decryption aware version of `parse_string`. It's still an unfortunately long implementation considering that the only real difference between the eyaml backend and the yaml backend is the change to `::Heira::Backend.parse_string` that allows it to process encrypted values. I feel like this backend could be trimmed down so that it inherits from the yaml backend, but the issues with doing that are tricky enough to solve that I'm not going to pursue it at this point.
Thanks for the update. Unfortunately I only have a 'runtime' environment. For example bundle doesn't seem to exist on my system and yum search bundle didn't turn up anything. I'd like to try your fix. Suggestions on how to proceed? |
Try |
OK. I don't mean to be rude but I dare not run gem. We've had terrible problems mixing packages managed with gem and others managed with RPM. I'll see if I can track down the RPM'd version of bundler. |
I'm going to mark this as a duplicate until proven otherwise. We'll try and get a gem cut by the end of the week that includes this PR @larryfast |
|
The @larryfast - have you had a chance to test this against v2.0.1? |
Tested eyaml 2.0.1 with hiera_hash and seems to be working now. |
I just started evaluating hiera-eyaml and hit a glitch. It seems that any attempt to read a hash in an eyaml file using hiera_hash(), produces an error:
"Error 400 on SERVER: Resolution type is hash but parsed_answer is a Hash" The error occurs even if the hash does not contain any encrypted values. One more detail:
I'm using heira-eyaml 2.0.0 on puppet 3.2.3. Has anyone seen this before?
The following code snippets should reproduce the problem:
file: my_hiera.eyaml
somehash:
foo: this is just a string
code:
$a = hiera( 'somehash') # This succeeds
$b = hiera_hash('somehash') # This fails
The text was updated successfully, but these errors were encountered: