Hello,
Similar to the database resource in the MySQL cookbook, I am trying to
add role and database resources to the PostgreSQL cookbook.
https://github.com/atriso/chef-repo-pas
Most of the code is in place (cleanup needed), but I am stuck with an
error that my Postgres client tells me I’m not connected, just after
my connection is made.
Generated at Mon Jun 06 23:47:37 -0700 2011
PGError: postgresql_role[openerp] (openerp::database line 30) had an
error: not connected
/tmp/vagrant-chef/cookbooks-0/postgresql/providers/role.rb:69:in exec' /tmp/vagrant-chef/cookbooks-0/postgresql/providers/role.rb:69:in
exists?’
/tmp/vagrant-chef/cookbooks-0/postgresql/providers/role.rb:24:in
class_from_file' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/provider.rb:104:in
instance_eval’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/provider.rb:104:in
action_create' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/resource.rb:417:in
send’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/resource.rb:417:in
run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/runner.rb:45:in
run_action’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/runner.rb:78:in
converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/runner.rb:78:in
each’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/runner.rb:78:in
converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/resource_collection.rb:94 /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in
call’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/resource_collection/stepable_iterator.rb:116:in
call_iterator_block' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in
step’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/resource_collection/stepable_iterator.rb:104:in
iterate' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in
each_with_index’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/resource_collection.rb:92:in
execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/runner.rb:76:in
converge’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/client.rb:312:in
converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/client.rb:160:in
run’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/application/solo.rb:192:in
run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/application/solo.rb:183:in
loop’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/…/lib/chef/application/solo.rb:183:in
run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/../lib/chef/application.rb:66:in
run’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/chef-solo:25
/usr/bin/chef-solo:19:in `load’
/usr/bin/chef-solo:19
Could anyone have a look at the code and see where I missed something?
Ringo