[chef] Re: Cookbook compile issue when using 'postgresql::ruby'


Chronological Thread 
  • From: Cooper Simmons < >
  • To:
  • Subject: [chef] Re: Cookbook compile issue when using 'postgresql::ruby'
  • Date: Sat, 21 Mar 2015 21:56:26 -0500

For anyone who encounters this issue in the future...
yum-pgdg was being used to pull in a repo for PostgreSQL v9.4 before I started adding the functionality of the 'postgresql::ruby' recipe.

When I removed / stopped using yum-pgdg and set node['postgresql']['enable_pgdg_yum'] to true and had a working node['postgresql']['pgdg']['repo_rpm_url'] things were looking much better.

I also had to set up yum to install gcc during cookbook compilation:
yum_package 'gcc' do
  action :nothing
end.run_action :install


Hope this helps someone.
Thanks,
Cooper



On Thu, Mar 19, 2015 at 12:20 AM, Cooper Simmons < " target="_blank"> > wrote:
I am trying to get the ruby recipe working in the hw postgresql cookbook.
We are currently using v3.4.16:

The run list for the node looks like this when I run knife ec2 server create:
"role[base-dw-aws],recipe[yum-pgdg],role[db-postgresql]"

I have in the db-postgresql role:
 "run_list": [
    "recipe[dw-server-postgresql::pg-install]"
  ]

Inside the pg-install recipe I have:
include_recipe 'postgresql::client'
include_recipe 'postgresql::server'
include_recipe 'postgresql::ruby'


This fails during cookbook compilation:
"No version specified, and no candidate version available for postgresql94"
Here is the full trace output:


The chef run completes fine without error if I just remove "include_recipe 'postgresql::ruby'" and fails every time with "No version specified, and no candidate version available for postgresql94" when 'postgresql::ruby' is included.

I'm confused b/c of course 'recipe[yum-pgdg]' has not yet run when the run fails so there really is no postgresql94 candidate available. But the run is failing during compiling the cookbooks, not during the run. 
How does this happen and how can I get it working?  :-)

Thanks,
Cooper








Archive powered by MHonArc 2.6.16.

§