jesseadams / sphinx-cookbook

Chef cookbook for Sphinx Search (searchd)
14 stars 27 forks source link

Installing from source fails due to nil version #11

Closed jimmycuadra closed 11 years ago

jimmycuadra commented 11 years ago

This commit seems to have broken the ability to install from source because the Sphinx version attribute is used to determine the filename and URL.

The following trace is from running the cookbook on a Vagrant VM with Chef Solo.

[2013-04-19T20:38:07+00:00] INFO: Processing remote_file[/tmp/vagrant-chef-1/sphinx--release.tar.gz] action create_if_missing (sphinx::source line 26)

================================================================================
Error executing action `create_if_missing` on resource 'remote_file[/tmp/vagrant-chef-1/sphinx--release.tar.gz]'
================================================================================

Net::HTTPServerException
------------------------
404 "Not Found"

Resource Declaration:

---------------------
# In /tmp/vagrant-chef-1/chef-solo-2/cookbooks/sphinx/recipes/source.rb

 26: remote_file sphinx_tar do
 27:   source node[:sphinx][:url]
 28:   action :create_if_missing
 29: end
 30: 

Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-2/cookbooks/sphinx/recipes/source.rb:26:in `from_file'

remote_file("/tmp/vagrant-chef-1/sphinx--release.tar.gz") do
  provider Chef::Provider::RemoteFile
  action [:create_if_missing]
  retries 0
  retry_delay 2
  path "/tmp/vagrant-chef-1/sphinx--release.tar.gz"
  backup 5
  cookbook_name :sphinx
  recipe_name "source"
end

[2013-04-19T20:38:08+00:00] INFO: Running queued delayed notifications before re-raising exception
[2013-04-19T20:38:08+00:00] INFO: template[/etc/sysconfig/memcached] sending restart action to service[memcached] (delayed)
[2013-04-19T20:38:08+00:00] INFO: Processing service[memcached] action restart (change::memcached line 3)
[2013-04-19T20:38:08+00:00] INFO: service[memcached] restarted
[2013-04-19T20:38:08+00:00] ERROR: Running exception handlers
[2013-04-19T20:38:08+00:00] ERROR: Exception handlers complete
[2013-04-19T20:38:08+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-04-19T20:38:08+00:00] FATAL: Net::HTTPServerException: remote_file[/tmp/vagrant-chef-1/sphinx--release.tar.gz] (sphinx::source line 26) had an error: Net::HTTPServerException: 404 "Not Found"
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
jesseadams commented 11 years ago

Thanks for the report! I should have a fix for this later today. In the meantime, you can explicitly override the version attribute as a workaround.