Skip to content
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

services hash to yaml generate garbage #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

barrowkwan
Copy link

to_yaml has generated garbage and make the newrelic plugin configuration completely invalid. The fix is to convert Chef's Hash to ruby hash , then JSON then to yaml. Without the JSON part still causing garbage in the configuration.

This problem seems happened with Chef 12. Here is a similar case with the to_yaml. (http://lists.opscode.com/sympa/arc/chef/2014-02/msg00054.html)

to_yaml has generated garbage and make the newrelic plugin configuration completely invalid.  The fix is to convert Chef's Hash to ruby hash , then JSON then to yaml.  Without the JSON part still causing garbage in the configuration.
@hlarsen
Copy link

hlarsen commented May 30, 2017

@djoos any thoughts on this? fixes the issue for me...

@jason-kane
Copy link

fixes the problem for me also

@djoos
Copy link
Member

djoos commented Aug 13, 2018

This snippet of code has always felt "dirty" to me and hurting to the eye - unfortunately this doesn't improve things :-)

Having said that, I am happy to merge this inso it does what it is expected to do. Is it right to understand that on Chef 10, 11, 13 & 14 the original code does the trick, but there's an issue in Chef 12?

Thanks in advance for your feedback!
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants