mburns / chef-openerp-cookbook

Chef cookbook for OpenERP
8 stars 9 forks source link

nomethod error: postgres_role #1

Open aruntomar opened 12 years ago

aruntomar commented 12 years ago

Hi!

I"m getting a nomethod error while deploying openerp via chef recipe. Your help would be really appreciated.

Following are the details: os: ubuntu 10.4 recipe: postgresql : 0.99.2 recipe : openerp: 0.0.1

[Mon, 05 Mar 2012 11:00:24 +0530] INFO: execute[apt-get update] ran successfully [Mon, 05 Mar 2012 11:00:24 +0530] INFO: Processing package[postgresql-client] action install (postgresql::client line 37) [Mon, 05 Mar 2012 11:00:24 +0530] INFO: Processing package[libpq-dev] action install (postgresql::client line 37) [Mon, 05 Mar 2012 11:00:24 +0530] INFO: Processing gem_package[pg] action install (postgresql::client line 42) [Mon, 05 Mar 2012 11:00:42 +0530] INFO: gem_package[pg] installed version 0.13.2 [Mon, 05 Mar 2012 11:00:44 +0530] ERROR: Running exception handlers [Mon, 05 Mar 2012 11:00:44 +0530] FATAL: Saving node information to /var/chef/cache/failed-run-data.json [Mon, 05 Mar 2012 11:00:44 +0530] ERROR: Exception handlers complete [Mon, 05 Mar 2012 11:00:44 +0530] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [Mon, 05 Mar 2012 11:00:44 +0530] FATAL: NoMethodError: undefined method `postgresql_role' for #Chef::Recipe:0x7f8db131c4c8

root@udev1:~# cat /var/chef/cache/chef-stacktrace.out Generated at Mon Mar 05 11:00:44 +0530 2012 NoMethodError: undefined method postgresql_role' for #<Chef::Recipe:0x7f8db131c4c8> /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/recipe_definition_dsl_core.rb:56:inmethod_missing' /var/chef/cache/cookbooks/openerp/recipes/database.rb:30:in from_file' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/cookbook_version.rb:578:inload_recipe' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/language_include_recipe.rb:40:in include_recipe' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/language_include_recipe.rb:27:ineach' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/language_include_recipe.rb:27:in include_recipe' /var/chef/cache/cookbooks/openerp/recipes/default.rb:20:infrom_file' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/cookbook_version.rb:578:in load_recipe' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/language_include_recipe.rb:40:ininclude_recipe' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/language_include_recipe.rb:27:in each' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/language_include_recipe.rb:27:ininclude_recipe' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:72:in load' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:69:ineach' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:69:in load' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/client.rb:195:insetup_run_context' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/client.rb:159:in run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application/client.rb:239:inrun_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application/client.rb:229:in loop' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application/client.rb:229:inrun_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application.rb:67:in run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/chef-client:26 /usr/bin/chef-client:19:inload'

Regards, Arun.

martinhbramwell commented 12 years ago

Arun,

I'm suffering the same show stopper. Did you find a solution?

Thanks, Hasan

aruntomar commented 12 years ago

Hi Hasan,

2 choices:

  1. Basically there should be an lwrp, like the one's available for mysql.
  2. write a definition and use it.

I"m currently preparing for my talk for rubyconfindia, after that i'll try to write the definition and present a solution.

Arun.

martinhbramwell commented 12 years ago

Hi Arun,

I appreciate your quick response.

I have too much experience with Java & SQL. A lot with bash shell scripting. A tiny bit with Chef. None at all with Ruby.

I'll read up about lwrp, and try to make a start on it. Not sure which is easier, start from scratch or try to fix the problems in this cookbook.

What do you mean by "a definition" ?

Best of luck with the talk. "Unity" sounds like a great capability. (It's a pity the new Ubuntu GUI overloads the name, though.)

Rgds, Hasan

aruntomar commented 12 years ago

Hi Hasan,

Definitions: http://wiki.opscode.com/display/chef/Definitions

I"ve not written LWRP, so don't know how difficult or easy that would be. but i believe writing definition would be much easy.

My talk is on ISP-Unity, we are releasing a gem by the same name. ISP-unity will automatically load balance and failover on multiple internet connections. the project is hosted on github, if you are interested. https://github.com/aruntomar/isp_unity

Arun.