[chef] Re: Re: Re: Re: Re: Re: Re: EOFError when downloading cookbooks with knife


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: EOFError when downloading cookbooks with knife
  • Date: Mon, 17 Sep 2012 11:03:42 -0700


On Wednesday, September 12, 2012 at 11:43 PM, Nanuk Krinner wrote:

Hi,

On 09/12/2012 05:48 PM, Daniel DeLeo wrote:
[...]
Can you reproduce this? What I described is how it's supposed to work
and how it works most of the time, so it might be a tricky bug.

It is reproducable for me. Look:
=================================
node31:/var/chef/cookbooks # knife cookbook create ntp
** Creating cookbook ntp
** Creating README for cookbook: ntp
** Creating metadata for cookbook: ntp

node31:/var/chef/cookbooks # vi ntp/recipes/default.rb

node31:/var/chef/cookbooks # vi ntp/templates/default/ntp.conf.erb

node31:/var/chef/cookbooks # knife cookbook upload ntp -VV
DEBUG: Using configuration from /root/.chef/knife.rb
DEBUG: No chefignore file found at /var/chef/cookbooks/chefignore no
files will be ignored
DEBUG: No chefignore file found at /var/chef/site-cookbooks/chefignore
no files will be ignored
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to node31.cluster.xs:4000/cookbooks
Uploading ntp [0.0.1]
INFO: Saving ntp
INFO: Validating ruby files
INFO: Validating templates
INFO: Syntax OK
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via POST to node31.cluster.xs:4000/sandboxes
INFO: Uploading files
INFO: Uploading /var/chef/cookbooks/ntp/recipes/default.rb (checksum hex
= d54d5cd27b8f37dbeb6fd5232a1883b0) to
INFO: Uploading /var/chef/cookbooks/ntp/templates/default/ntp.conf.erb
(checksum hex = 1a2e519cdc43799100bf074f4b96a50b) to
INFO: Uploading /var/chef/cookbooks/ntp/metadata.rb (checksum hex =
875e8e64f01fb64df4f69b2c7eac7d30) to
DEBUG: /var/chef/cookbooks/ntp/README.md has not changed
DEBUG: Committing sandbox
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via PUT to
node31.cluster.xs:4000/sandboxes/2f1537a02aee4492b7af2e6f731272d2
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via PUT to
node31.cluster.xs:4000/cookbooks/ntp/0.0.1
INFO: Upload complete!
Uploaded 1 cookbook.

node31:/var/chef/cookbooks # knife cookbook download ntp -VV
DEBUG: Using configuration from /root/.chef/knife.rb
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to node31.cluster.xs:4000/cookbooks/ntp
Downloading ntp cookbook version 0.0.1
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to
node31.cluster.xs:4000/cookbooks/ntp/0.0.1
Downloading resources
Downloading providers
Downloading recipes
DEBUG: Downloading recipes/default.rb to
/var/chef/cookbooks/ntp-0.0.1/recipes/default.rb
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to
node31.cluster.xs:4000/cookbooks/ntp/0.0.1/files/d54d5cd27b8f37dbeb6fd5232a1883b0
DEBUG: Streaming download from
to tempfile /tmp/chef-rest20120913-13347-6bhvf4
Downloading definitions
Downloading libraries
Downloading attributes
Downloading files
Downloading templates
DEBUG: Downloading templates/default/ntp.conf.erb to
/var/chef/cookbooks/ntp-0.0.1/templates/default/ntp.conf.erb
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to
node31.cluster.xs:4000/cookbooks/ntp/0.0.1/files/1a2e519cdc43799100bf074f4b96a50b
DEBUG: Streaming download from
to tempfile /tmp/chef-rest20120913-13347-4hc635
Downloading root_files
DEBUG: Downloading metadata.rb to /var/chef/cookbooks/ntp-0.0.1/metadata.rb
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to
node31.cluster.xs:4000/cookbooks/ntp/0.0.1/files/875e8e64f01fb64df4f69b2c7eac7d30
DEBUG: Streaming download from
to tempfile /tmp/chef-rest20120913-13347-105f2d8
DEBUG: Downloading README.md to /var/chef/cookbooks/ntp-0.0.1/README.md
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to
node31.cluster.xs:4000/cookbooks/ntp/0.0.1/files/6e21094b7a920e374e7261f50e9c4eef
/usr/lib64/ruby/1.9.1/net/protocol.rb:141:in `read_nonblock': end of
file reached (EOFError)
from /usr/lib64/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
from /usr/lib64/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
from /usr/lib64/ruby/1.9.1/net/protocol.rb:132:in `readline'
from /usr/lib64/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
from /usr/lib64/ruby/1.9.1/net/http.rb:2551:in `read_new'
from /usr/lib64/ruby/1.9.1/net/http.rb:1319:in `block in
transport_request'
from /usr/lib64/ruby/1.9.1/net/http.rb:1316:in `catch'
from /usr/lib64/ruby/1.9.1/net/http.rb:1316:in `transport_request'
from /usr/lib64/ruby/1.9.1/net/http.rb:1293:in `request'
from /usr/lib64/ruby/1.9.1/net/http.rb:1286:in `block in request'
from /usr/lib64/ruby/1.9.1/net/http.rb:745:in `start'
from /usr/lib64/ruby/1.9.1/net/http.rb:1284:in `request'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest/rest_request.rb:99:in
`block in call'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest/rest_request.rb:114:in
`hide_net_http_bug'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest/rest_request.rb:98:in
`call'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:299:in
`block in streaming_request'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:334:in
`retriable_rest_request'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:297:in
`streaming_request'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:128:in
`get_rest'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:90:in
`block (2 levels) in run'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:85:in
`each'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:85:in
`block in run'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:82:in
`each'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:82:in
`run'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife.rb:402:in
`run_with_pretty_exceptions'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife.rb:168:in `run'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/application/knife.rb:123:in
`run'
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/bin/knife:25:in `<top
(required)>'
from /usr/bin/knife:23:in `load'
from /usr/bin/knife:23:in `<main>'

node31:/var/chef/cookbooks # knife cookbook show ntp
ntp 0.0.1

node31:/var/chef/cookbooks # knife cookbook test ntp
checking ntp
ERROR: Errno::ENOENT: No such file or directory -
/var/chef/cookbooks/ntp-0.0.1/README.md

node31:/var/chef/cookbooks # ls ntp-0.0.1/*
ntp-0.0.1/metadata.rb

ntp-0.0.1/recipes:
default.rb

ntp-0.0.1/templates:
default

=========================================================================

Let me know if you need more information. If I edit README.md before
uploading, it gets uploaded too as it has changed. Then the recipe can
be downloaded too. To create this recipe I followed closely the guide at
.

Regards,
Nanuk

Chef server keeps the list of files it has in couchdb. Perhaps you're in a state where couchdb has an entry for 6e21094b7a920e374e7261f50e9c4eef, but that file is missing on your filesystem?

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§