[chef] Re: Re: 500 Server error


Chronological Thread 
  • From: Tristan Sloughter < >
  • To:
  • Subject: [chef] Re: Re: 500 Server error
  • Date: Wed, 5 Jan 2011 12:21:20 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=gndSE9uAtMv+oPLm5ZxmnuqY91CLirmIBQC9dj1zHHOc3ppbZTK6rRHMp23B5diH2p xicYu4ApGV23/N2Q2uzPMdFDoF6d/HyS+AY40CLXXrSaeY2stluHTt/DwoYfcQ2ftviT 8DObJq8Z7JSx1wqxO8mTAfo/bShHUR4xSQ5Wg=

Ah, yeah, I'm running 0.9.8. I should probably update, I think the problem I had with the template not updating on the client is fixed in a later version as well.

Great, that worked! Everything is working again.

But... the template still isn't being used on the client. This is really pretty nuts, hehe. I just added '-smp enable' to the template and I see clearly its in the template by going to the web interface and viewing it in the cookbook but when I look at the file it is saved as on the clients that piece isn't there...

I'd rather not have to get things updated to a newer Chef to fix this unless its the quickest/easier way.

Tristan

On Wed, Jan 5, 2011 at 12:13 PM, Daniel DeLeo < "> > wrote:
On Wed, Jan 5, 2011 at 9:54 AM, Tristan Sloughter
< "> > wrote:
> I was having a problem where I had updated a template file (I verified
> through the web interface that the template file was updated) but when the
> client was run on a client it would not get the new version. Trying to force
> it to I ended up delete /var/cache/chef/checksums/ on the server... This
> seems to have been very bad.
> When I realized this had borked the cookbook I did a bulk delete and purge
> of that cookbook. I then ran the upload command on it again. This doesn't
> seem to really be doing anything. It doesn't output checksums of all files
> that its uploading like usual, it just displays the messages of the steps
> and acts like it ran fine. I delete the checksums in ~/.chef/checksums just
> in case but still nothing.

What version of Chef do you have on the server? The `--purge` option
was not implemented until 0.9.10 and, unfortunately, I made a mistake
when I implemented it so it's not quite usable yet (the fix is merged
in master, but not yet in a released version). These bugs are tracked
as CHEF-1364[0] and CHEF-1836[1].

What you're seeing is that the database has checksum objects that are
supposed to correspond to files on disk (in that checksums directory)
but the files have been deleted. The easiest way to get back to a good
state is to delete the checksum documents from the database. To do
that, you need to log in to your chef-server box, then run `shef`.
From shef, run the following code to delete the checksum documents:

   require 'chef/checksum'
   r = Chef::REST.new('http://localhost:5984/chef/_design/checksums/_view/',
false, false)
   r.get_rest("all")["rows"].each {|c| c["value"].cdb_destroy}

After that, upload all of your cookbooks again and you should be good to go.

Dan DeLeo


0. http://tickets.opscode.com/browse/CHEF-1364
1. http://tickets.opscode.com/browse/CHEF-1836


> So now when I run the client on a node with -l debug I get lots of:
> [Wed, 05 Jan 2011 11:44:53 -0600] DEBUG:
> /cookbooks/ecdmarket/0.0.1/files/40e78bbf6e012c82eaefebd7292faeb3 (zero
> content length or no Content-Length header)
> And then a 500 error.
> Which I assume is due to the upload not working correctly.
> Does anyone have any ideas?
> Thanks,
> Tristan




Archive powered by MHonArc 2.6.16.

§