Skip to content

Instantly share code, notes, and snippets.

@anentropic
Created October 1, 2012 16:53
Show Gist options
  • Save anentropic/3812986 to your computer and use it in GitHub Desktop.
Save anentropic/3812986 to your computer and use it in GitHub Desktop.
Chef traceback
[2012-10-01T16:43:39+00:00] INFO: Processing application_python_django[xxx] action before_deploy (wsgi_apps::xxx line 109)
================================================================================
Error executing action `before_deploy` on resource 'application_python_django[xxx]'
================================================================================
ArgumentError
-------------
wrong number of arguments (1 for 2)
Cookbook Trace:
---------------
/srv/chef/file_store/cookbooks/application/libraries/default.rb:134:in `provider_for_resource'
/srv/chef/file_store/cookbooks/application/libraries/default.rb:134:in `deploy_provider'
/srv/chef/file_store/cookbooks/application/libraries/default.rb:141:in `release_path'
/srv/chef/file_store/cookbooks/application/resources/default.rb:88:in `release_path'
/srv/chef/file_store/cookbooks/application/libraries/default.rb:68:in `send'
/srv/chef/file_store/cookbooks/application/libraries/default.rb:68:in `method_missing'
/srv/chef/file_store/cookbooks/application_python/providers/django.rb:232:in `create_wsgi_file'
/srv/chef/file_store/cookbooks/application_python/providers/django.rb:224:in `create_wsgi_file'
/srv/chef/file_store/cookbooks/application_python/providers/django.rb:66:in `class_from_file'
/srv/chef/file_store/cookbooks/application/providers/default.rb:112:in `before_deploy'
/srv/chef/file_store/cookbooks/application/providers/default.rb:111:in `each'
/srv/chef/file_store/cookbooks/application/providers/default.rb:111:in `before_deploy'
Resource Declaration:
---------------------
# In /srv/chef/file_store/cookbooks/application/resources/default.rb
108: Chef::Log.debug "Trying to load application resource #{resource_name} for #{name}"
109: resource = super(resource_name.to_sym, self.name, &block)
110: break
Compiled Resource:
------------------
# Declared in /srv/chef/file_store/cookbooks/application/resources/default.rb:109:in `method_missing'
application_python_django("xxx") do
debug true
cookbook_name "wsgi_apps"
database_master_role "db_server"
type :django
settings_module "xxx.settings"
retry_delay 2
updated_by_last_action true
migration_command "/home/vagrant/xxx/wsgi_apps/xxx/shared/env/bin/python manage.py syncdb --noinput && /home/vagrant/xxx/wsgi_apps/xxx/shared/env/bin/python manage.py migrate --noinput --ignore-ghost-migrations"
manage_py_migration_commands ["/home/vagrant/xxx/wsgi_apps/xxx/shared/env/bin/python manage.py syncdb --noinput", "/home/vagrant/xxx/wsgi_apps/xxx/shared/env/bin/python manage.py migrate --noinput --ignore-ghost-migrations"]
databases {"default"=>{"username"=>"xxx", "engine"=>"mysql", "options"=>{"init_command"=>"SET storage_engine=MYISAM"}, "password"=>"lNtPUa2xCH_DaDvsei0V", "host"=>"localhost", "database"=>"xxx"}, "stats"=>{"username"=>"stats", "engine"=>"mysql", "options"=>{"init_command"=>"SET storage_engine=MYISAM"}, "password"=>"WUQetGIrlhdxayKdmSAj", "host"=>"localhost", "database"=>"stats"}}
retries 0
updated true
settings_template "xxx/local_settings.py.erb"
recipe_name "xxx"
action [:nothing]
virtualenv_options "--distribute"
symlink_before_migrate {"django.wsgi"=>"conf/django.wsgi", "local_settings.py"=>"xxx/local_settings.py"}
wsgi {"path"=>"conf/django.wsgi"}
local_settings_file "xxx/local_settings.py"
end
================================================================================
Error executing action `create` on resource 'ruby_block[xxx before_deploy]'
================================================================================
ArgumentError
-------------
application_python_django[xxx] (wsgi_apps::xxx line 109) had an error: ArgumentError: wrong number of arguments (1 for 2)
Cookbook Trace:
---------------
/srv/chef/file_store/cookbooks/application/libraries/default.rb:134:in `provider_for_resource'
/srv/chef/file_store/cookbooks/application/libraries/default.rb:134:in `deploy_provider'
/srv/chef/file_store/cookbooks/application/libraries/default.rb:141:in `release_path'
/srv/chef/file_store/cookbooks/application/resources/default.rb:88:in `release_path'
/srv/chef/file_store/cookbooks/application/libraries/default.rb:68:in `send'
/srv/chef/file_store/cookbooks/application/libraries/default.rb:68:in `method_missing'
/srv/chef/file_store/cookbooks/application_python/providers/django.rb:232:in `create_wsgi_file'
/srv/chef/file_store/cookbooks/application_python/providers/django.rb:224:in `create_wsgi_file'
/srv/chef/file_store/cookbooks/application_python/providers/django.rb:66:in `class_from_file'
/srv/chef/file_store/cookbooks/application/providers/default.rb:112:in `before_deploy'
/srv/chef/file_store/cookbooks/application/providers/default.rb:111:in `each'
/srv/chef/file_store/cookbooks/application/providers/default.rb:111:in `before_deploy'
Resource Declaration:
---------------------
# In /srv/chef/file_store/cookbooks/application/providers/default.rb
108:
109: ruby_block "#{new_resource.name} before_deploy" do
110: block do
111: new_resource.sub_resources.each do |resource|
112: resource.run_action :before_deploy
113: end
114: callback(:before_deploy, new_resource.before_deploy)
115: end
116: end
117: end
Compiled Resource:
------------------
# Declared in /srv/chef/file_store/cookbooks/application/providers/default.rb:109:in `before_deploy'
ruby_block("xxx before_deploy") do
cookbook_name "wsgi_apps"
retry_delay 2
retries 0
block #<Proc:0xb6be5828@/srv/chef/file_store/cookbooks/application/providers/default.rb:110>
action "create"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment