Chef

remote_file doesn't support being passed a URL as a source, but the documentation argues otherwise - solo only

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.5.2
  • Fix Version/s: 0.5.4
  • Component/s: Chef Solo
  • Labels:
    None

Activity

Hide
Adam Jacob added a comment - 03/Feb/09 6:38 PM

I can't reproduce this. From the following:

remote_file "/tmp/rabbitmq-server_1.4.0-1_all.deb" do
source "http://www.rabbitmq.com/releases/rabbitmq-server/v1.4.0/rabbitmq-server_1.4.0-1_all.deb"
mode 0644
end

I wind up with the deb properly in /tmp.

Can you give some more detail here, because as far as I can see, this is PEBKAC.

Show
Adam Jacob added a comment - 03/Feb/09 6:38 PM I can't reproduce this. From the following: remote_file "/tmp/rabbitmq-server_1.4.0-1_all.deb" do source "http://www.rabbitmq.com/releases/rabbitmq-server/v1.4.0/rabbitmq-server_1.4.0-1_all.deb" mode 0644 end I wind up with the deb properly in /tmp. Can you give some more detail here, because as far as I can see, this is PEBKAC.
Hide
Adam Jacob added a comment - 03/Feb/09 6:45 PM

In talking with Sean Cribbs, this issue only happens with solo - and that makes sense, because:

In chef/lib/chef/provider/remote_file.rb

if Chef::Config[:solo]
filename = find_preferred_file(
@new_resource.cookbook_name.to_s,
:remote_file,
source,
@node[:fqdn],
@node[:platform],
@node[:platform_version]
)
Chef::Log.debug("Using local file for remote_file:#{filename}")
raw_file = ::File.open(filename)
else

Note that it has no url generation. We just need to refactor this into a more sane implementation - its kind of a hack.

Show
Adam Jacob added a comment - 03/Feb/09 6:45 PM In talking with Sean Cribbs, this issue only happens with solo - and that makes sense, because: In chef/lib/chef/provider/remote_file.rb if Chef::Config[:solo] filename = find_preferred_file( @new_resource.cookbook_name.to_s, :remote_file, source, @node[:fqdn], @node[:platform], @node[:platform_version] ) Chef::Log.debug("Using local file for remote_file:#{filename}") raw_file = ::File.open(filename) else Note that it has no url generation. We just need to refactor this into a more sane implementation - its kind of a hack.
Hide
AJ Christensen added a comment - 05/Feb/09 3:12 PM - edited

Looks good

Pending CLA

Show
AJ Christensen added a comment - 05/Feb/09 3:12 PM - edited Looks good Pending CLA
Hide
Sean Cribbs added a comment - 05/Feb/09 6:04 PM

Additional updates available on HEAD of CHEF-89 branch: http://github.com/seancribbs/chef/tree/CHEF-89

Show
Sean Cribbs added a comment - 05/Feb/09 6:04 PM Additional updates available on HEAD of CHEF-89 branch: http://github.com/seancribbs/chef/tree/CHEF-89
Hide
Adam Jacob added a comment - 06/Feb/09 11:24 PM

This is fixed - you rock, Sean. Nice work.

Show
Adam Jacob added a comment - 06/Feb/09 11:24 PM This is fixed - you rock, Sean. Nice work.

People

Vote (0)
Watch (0)

Dates

  • Created:
    03/Feb/09 5:58 PM
    Updated:
    06/Feb/09 11:24 PM
    Resolved:
    05/Feb/09 3:12 PM