On Wednesday, April 22, 2015 at 11:18 AM, Fabien Delpierre wrote:
> Daniel,
> Fortunately I'm only working with one template file here, so it's easy to narrow down, but I don't see what could possibly be wrong with the template: http://pastebin.com/TTLTg3Yz
> You don't have to read through it unless you feel like it, but I'm sharing it to show that that this is very, very standard/trivial stuff.
> That being said, even after moving this lone template file out of the templates/default directory of my cookbook so that it wouldn't be uploaded by Berkshelf, $ berks upload still fails in the same fashion, so that stinks.
It wouldn’t be the content in the template, but the filename that would be the issue. When you upload a cookbook, the client (knife or berks) sends the server a JSON data structure as described here: https://github.com/chef/chef/blob/44d70ba0f1b38bc3e1170ae978ad5e9a11679df3/lib/chef/cookbook_manifest.rb#L78-L112
From a quick reading of the server code https://github.com/chef/oc_erchef/blob/8a122c269746070352814fa498c57ff75eb60121/apps/chef_objects/src/chef_cookbook_version.erl#L274-L279 it is checking that each item in the templates array is a JSON object with name, path, checksum, and specificity keys (as strings) and String values.
I don’t know what the debugging options are for berks here, it would be really helpful if you could see what it was attempting to upload. Worst case scenario you can use socat as a debugging proxy. Filing a bug with berks is probably your best path forward at this point, though.
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.