[chef] Re: Re: Re: $ berks upload keeps failing since yesterday


Chronological Thread 
  • From: Fabien Delpierre < >
  • To: chef < >
  • Subject: [chef] Re: Re: Re: $ berks upload keeps failing since yesterday
  • Date: Wed, 22 Apr 2015 14:18:44 -0400

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.

On Wed, Apr 22, 2015 at 1:31 PM, Daniel DeLeo < " target="_blank"> > wrote:
On Wednesday, April 22, 2015 at 10:24 AM, Fabien Delpierre wrote:
> For what it's worth, I actually just had to add a cookbook to my Berksfile, fortunately it comes before "srv01" alphabetically, and $ berks upload uploads that cookbook fine. Of course I still get the failure when it reaches my own cookbook. But that suggests that the issue is with my cookbook, somehow. I just don't know what it could be.
>
> On Wed, Apr 22, 2015 at 12:59 PM, Fabien Delpierre < "> (mailto: "> )> wrote:
> > Hello,
> > I'm working on a custom cookbook; since yesterday, whenever I run $ berks upload to ship the latest version of the cookbook to my Chef server, Berkshelf goes through all the cookbook dependencies alphabetically, as normal, skips all of them since they don't require an update, again as normal, then it gets to my cookbook (it's called "srv01") and exits unexpectedly with this output (http://pastebin.com/3GZg4SMA) (Pastebin link).
>


Unfortunately, this error from the Chef Server doesn’t say exactly _what_ the problematic data is, but the error message:

{"error":["Invalid element in array value of 'templates'.”]}

indicates that in the JSON representation of your cookbook content, one of the entries in templates has a value the server considers invalid. If if uploads fine with `knife` then this is probably a bug in berks. You can file a much more delightful bug report if you can narrow the problem down to a specific template file name (e.g., try deleting the templates one-by-one until you find out which file name is the problem). Going through that will probably give you an idea of how to work around the issue as well.


--
Daniel DeLeo





Archive powered by MHonArc 2.6.16.

§