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
doesn't work with chef11 #6
Comments
I tracked it down to the additional key-value pairs in the generated data_bag json file. Creating data_bags with knife solo data bag create DATABAG DATABAGITEM --json '{ "id": "DATABAGITEM" }' creates the following file (throwing an Data Bag Items must contain a Hash or Mash!) {"name":"data_bag_item_DATABAG_DATABAGITEM","json_class":"Chef::DataBagItem","chef_type":"data_bag_item","data_bag":"DATABAG","raw_data":{"id":"DATABAGITEM"}} versus the one which should be compatible with chef11 (11.2.0): {"id":"DATABAGITEM"} |
Just curious, why was this issue closed? |
Only the referenced issue got resolved - this one is still open (and still a problem with chef11). |
Yeah, I aiming to have an updated version this week. |
are there any updates on this? |
@arosenhagen i can't seem to reproduce this issue with the latest version of knife-solo_data_bag and chef 11.2.0/11.4.4. i threw together a couple of scripts of how i was testing here. if you already have vagrant installed, you you can just clone that repo and then |
FWIW I just created a data bag with this 0.4.0 of knife-solo_data_bag, knife-solo and Chef 11.4.4. Once I set my I did not use the |
i've spent a bit more time with this and have been unable to reproduce this. i'll leave this open for now and try a few more things to reproduce it. |
can't reproduce the error on chef solo 11.4.4 either. I had the issue with 11.4.0 but can't surely say it has been resolved now. |
I'll start by declaring I am new to this process of OSS. But I am trying to use knife solo with encrypted data bags on Ruby 2.0.0-p195 and under Chef 11.4.4. Not knowing what to expect I AM getting a consistent error when trying to decrypt: knife solo data bag create x pwds --secret-file ~/encrypted_data_bag_secret --json '{
So I tried to reproduce using the travis environment (my first CI experience). I forked the repository and added both Ruby 2.0.0-p195 and Chef 11.4.4 to the test environments. Ruby 2.0.0 seems to be working ok with the original test suite, but running 11.4.4 of Chef with all 3 Ruby configurations fails significantly. I would like to help fix this, but I am pushing my envelope of experience. Some guidance would be very helpful. I am going to try and look at the CI errors (which are slightly different but still in JSON parse arena, and see if I can produce a fix. |
@tjchambers This should be a separate issue as it appears to be unrelated to Chef-client itself. I am unable to reproduce locally.
|
@tjchambers it looks like in your example you are passing i'll also take a look adding chef 11.2.x and 11.4.x to the ci config. |
I appreciate you adding this to the CI. When I added 2.0.0-p195 Ruby and 11.4.4 Chef the pattern as numerous errors with 11.4.4 of Chef applied. I will double check my commands. Regards and thanks for this software, Tim
|
@arosenhagen @thbishop , i think my pull request #14 also fixes this issue. git clone https://github.com/gmanfunky/knife-solo_data_bag |
I can also reproduce this issue when I set Please don't blame me for I was using a GUI editor as $EDITOR :) |
Can we remove the extra stuff that knife-solo_data_bag puts around the raw_data? It should directly start with "id" |
@thbishop Any news? |
hi @allaire, this gem leverages chef's existing data bag logic to generate the data. specifically, the logic where the extra stuff is generated here. is the extra stuff causing a specific issue? if so, can you provide what version of knife-solo_data_bag, chef, data bag content (sanitized) and stack trace if possible? |
@thbishop Yes, it's exactly this stuff that is causing issue. I currently use knife-solo in a same chef-repo that I also use with Chef server. Chef server says that data bags with the extra layer added by I think with I'm using:
|
@allaire i ran through a bunch of tests using various 11.x versions of chef and i believe you are correct. i'll see if i can get a prerelease gem without the extra stuff out in the next couple of days. |
@thbishop You rock! Thank you sir 🍺 |
@allaire i haven't forgotten about this. i working through some issues i hit with testing on chef > 11.6. |
@thbishop Thanks for the update, I appreciate it :) |
@allaire i've pushed up a beta gem which i think address the issues. you may want to uninstall the current version with: gem uninstall knife-solo_data_bag and install the beta with: gem install knife-solo_data_bag --pre in my testing, i was able to edit existing data bags (with the additional metadata) and have it save without the metadata. give it a whirl. |
thanks @thbishop I'll give this a swing tomorrow! |
@thbishop Sorry for the delay, it seems to work great! |
@allaire no worries; thanks for testing it out. i'll cut a release |
v1.0.0 released. changelog |
since encrypted databags have been rewritten in chef11, the commands to create databags with knife solo don't work anymore :-(
The text was updated successfully, but these errors were encountered: