[chef] Re: Re: Large cookbook uploads fail with "unauthorized" after data upload


Chronological Thread 
  • From: Joshua Miller < >
  • To: " " < >
  • Cc: " " < >
  • Subject: [chef] Re: Re: Large cookbook uploads fail with "unauthorized" after data upload
  • Date: Sat, 24 Mar 2012 07:48:06 -0700

I think timberman was trying to direct you to something like this.  For anything over a one or two meg I find it works much better.


Transfer a file only if the remote source has changed (uses http_request resource)
remote_file "/tmp/couch.png" do
  action :nothing
end
 
  message ""
  action :head
  if File.exists?("/tmp/couch.png")
    headers "If-Modified-Since" => File.mtime("/tmp/couch.png").httpdate
  end
  notifies :create, resources(:remote_file => "/tmp/couch.png"), :immediately
end


Joshua 


On Mar 23, 2012, at 7:01 PM, Joshua Timberman < "> > wrote:

Ohai,

On Fri, Mar 23, 2012 at 6:54 PM, Jason J. W. Williams
< "> > wrote:
Is there a way to get a cookbook with several very large files to
upload via knife without this happening:

Uploading testcookbook             [0.5.0]
<-----Pauses here for about 30 mins while the cookbook uploads 90MB
ERROR: Failed to upload #<Chef::CookbookVersion:0x10178fdf0> : 401 Unauthorized
{"error":["Failed to authenticate. Please synchronize the clock on
your client"]}
/Library/Ruby/Gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in
`return!': 401 Unauthorized (RestClient::Request::Unauthorized)

Why are you putting several very large files in Chef? Surely there are
more efficient ways to manage these files? It is likely that such
files would take a long time to download when required by the client
and likewise time out.



--
Opscode, Inc
Joshua Timberman, Technical Program Manager
IRC, Skype, Twitter, Github: jtimberman



Archive powered by MHonArc 2.6.16.

§