[chef] Re: Re: Re: Re: Problem with remote_file downloading?


Chronological Thread 
  • From: Ash Berlin < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Problem with remote_file downloading?
  • Date: Wed, 8 Sep 2010 11:50:47 +0100

On 8 Sep 2010, at 11:45, Haselwanter Edmund wrote:

On 08.09.2010, at 11:40, Ash Berlin wrote:

n 8 Sep 2010, at 03:38, Joshua Miller wrote:
Can you wget or curl the file? 

curl -O works fine.

Its using ubuntu's system ruby, specifically  1.8.7.249-2

ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]

And I'm using the apt packages for chef - 0.9.8+dfsg

And yes this is reproduceable ever time on my server right now. The remote_file block is:

 remote_file "#{rvm_path}/src/rvm-#{ver}.tar.gz" do
   owner "rvm"
   group "rvm"
   mode 0644
   source "http://rvm.beginrescueend.com/releases/rvm-#{ver}.tar.gz"

   not_if do
     begin
       require "#{rvm_path}/lib/rvm/version.rb"
       RVM::Version::STRING == ver
     rescue Exception
       false
     end
   end
 end

ver in this case is "1.0.5"

Okay. I manually fixed the bug in net/http. The problem is the destination directory doesn't exist. Given that chef papers over any exception that happens in the processing block one step of the chef functions needs to rescue the exception and handle it more gracefully.

and what happens if you create the directory before remote_file ? I don't think this can be considered a bug? or should it? another option would be add a 

recursive option to the File or RemoteFile Ressource. But that would be not verbose methinks

cu edi

If i create the directory it works. The bug here is that in attempting to work around one problem in net/http chef has hidden any number of other possible problems.




Archive powered by MHonArc 2.6.16.

§