[chef] Re: Re: Re: How to control the order that Chef (solo) executes resources?


Chronological Thread 
  • From: Sascha Bates < >
  • Cc:
  • Subject: [chef] Re: Re: Re: How to control the order that Chef (solo) executes resources?
  • Date: Sun, 08 Jul 2012 19:57:01 -0500

Yes, Peter is correct. I'm looking at the postgres-client recipe and it's forcing install at compile time:

http://community.opscode.com/cookbooks/postgresql/source

pg_packages.each do |pg_pack|
  package pg_pack do
    action :nothing
  end.run_action(:install)
end
 
gem_package "pg" do
  action :nothing
end.run_action(:install)


There's probably a good reason for this.  You could change it so it's not running at compile time but that will probably break something else that assumes it's already available. Is this breaking your build-essentials install or are you just trying to figure out why it's running out of the order you assumed?
Sascha Bates
| 
 
 ">
  | 612 850 0444 | 
  | 
  | 

On 7/8/12 6:10 PM, Peter Norton wrote:
" type="cite">
Is it possible that your recipe mytardis::postgresql forces
installation of the client at compile time?  This is a trick that's
often used to make sure that some resources are available early in the
run, and which can make things appear to happen in an order that is
different from what's described in the cookbook, but in fact it is
what the cookbook author intended.

-Peter

On Sun, Jul 8, 2012 at 6:49 PM, Steve Bennett 
 
 "><
 > wrote:
Hi Sascha,
  Thanks for the suggestion. I tried commenting out the include_recipe that
I quoted before, so:

include_recipe "build-essential"
include_recipe "mytardis::deps"
include_recipe "mytardis::nginx"
#include_recipe "mytardis::postgresql"

In this form, the build no longer does any postgresql step, and proceeds
much further. So, I don't think there are any other "include_recipe
postgresql" lines. Any other ideas?

Are there any workarounds that would force build-essential to run first?

Steve


On 8 July 2012 23:24, Sascha Bates 
 
 "><
 > wrote:
This is your culprit:

[Sun, 08 Jul 2012 05:14:33 +0200] DEBUG: Loading Recipe postgresql::client
via include_recipe <-

Something has postgres as an include, probably at the top.

Sascha Bates
| 
 
 ">
  | 612 850 0444 | 
  |

  |


On 7/8/12 7:24 AM, Steve Bennett wrote:

[Sun, 08 Jul 2012 05:14:33 +0200] DEBUG: Loading Recipe postgresql::client
via include_recipe




Archive powered by MHonArc 2.6.16.

§