More direct download url to fix Chef::Exceptions::RedirectLimitExceeded #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Recently, when provisioning machines with chruby recipe (chef 11.10.0) you get an error Chef::Exceptions::RedirectLimitExceeded. Looks like GitHub makes redirects to download the actual file and that causes the problem. Not sure if that's absolutely right approach, but providing more direct download URL fixes the issue.
Here's the log from provisioning when the problem appears. Tested on few different OSX machines, different providers (virtualbox, parallels), different days.
[2014-03-23T12:28:57+00:00] INFO: remote_file[/var/chef/cache/chruby-1.tar.gz] created file /var/chef/cache/chruby-1.tar.gz
Error executing action
createon resource 'remote_file[/var/chef/cache/chruby-1.tar.gz]'Chef::Exceptions::RedirectLimitExceeded
Chef::Exceptions::RedirectLimitExceeded
Resource Declaration:
In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/ark/providers/default.rb
265: remote_file new_resource.release_file do
266: Chef::Log.debug('DEBUG: new_resource.release_file')
267: source new_resource.url
268: checksum new_resource.checksum if new_resource.checksum
269: action :create
270: notifies :run, "execute[unpack #{new_resource.release_file}]"
271: end
272:
Compiled Resource:
Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/ark/providers/default.rb:265:in `block in class_from_file'
remote_file("/var/chef/cache/chruby-1.tar.gz") do
provider Chef::Provider::RemoteFile
action [:create]
retries 0
retry_delay 2
path "/var/chef/cache/chruby-1.tar.gz"
backup 5
atomic_update true
source ["https://github.com/postmodern/chruby/archive/v0.3.7.tar.gz"]
use_etag true
use_last_modified true
cookbook_name :chruby
recipe_name "none"
end
[2014-03-23T12:29:02+00:00] INFO: Running queued delayed notifications before re-raising exception
Error executing action
install_with_makeon resource 'ark[chruby]'Chef::Exceptions::RedirectLimitExceeded
remote_file[/var/chef/cache/chruby-1.tar.gz](chruby::none line 265) had an error: Chef::Exceptions::RedirectLimitExceeded: Chef::Exceptions::RedirectLimitExceeded
Resource Declaration:
In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/chruby/recipes/default.rb
21: ark "chruby" do
22: url "https://github.com/postmodern/chruby/archive/v#{node['chruby']['version']}.tar.gz"
23: action :install_with_make
24: end
25:
Compiled Resource:
Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/chruby/recipes/default.rb:21:in `from_file'
ark("chruby") do
provider Chef::Provider::Ark
action [:install_with_make]
retries 0
retry_delay 2
cookbook_name :chruby
recipe_name "default"
url "https://github.com/postmodern/chruby/archive/v0.3.7.tar.gz"
extension "tar.gz"
prefix_bin "/usr/local/bin"
version "1"
path "/usr/local/chruby-1"
home_dir "/usr/local/chruby"
release_file "/var/chef/cache/chruby-1.tar.gz"
strip_leading_dir true
end
[2014-03-23T12:29:02+00:00] INFO: Running queued delayed notifications before re-raising exception
[2014-03-23T12:29:02+00:00] ERROR: Running exception handlers
[2014-03-23T12:29:02+00:00] ERROR: Exception handlers complete
[2014-03-23T12:29:02+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-03-23T12:29:02+00:00] ERROR: ark[chruby](chruby::default line 21) had an error: Chef::Exceptions::RedirectLimitExceeded: remote_file[/var/chef/cache/chruby-1.tar.gz](chruby::none line 265) had an error: Chef::Exceptions::RedirectLimitExceeded: Chef::Exceptions::RedirectLimitExceeded
[2014-03-23T12:29:02+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.