[chef] Re: RE: Re: which cookbook version used in chef-client run?


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: RE: Re: which cookbook version used in chef-client run?
  • Date: Thu, 10 Oct 2013 07:16:55 -0700


On Thursday, October 10, 2013 at 6:24 AM, Florian Hehlen wrote:

It would be really good to have this logged by default. I got into a problem where as far as I can see chef chose to one version over an other of recipe and it took me a while to figure out that this was happening. Having the versions logged would have helped identify the problem.

Here is what happened. Imagine three cookbooks A,B, C. B and C depend on A. But they don't necessarily depend on the same version of A because B and C just do different things. Now imagine B depends explicitly on version 1 of A and C depends explicitly on version 2 of A. Finally lets say I add B and C to the run list of a node.

The question is: Which version of A will be used? What I saw was that version 1 was being used for both. Has anyone else experienced this? Is this expected behavior. It does not seem to respect the cookbook' depends' contract. 

Cheers,
Florian
What frequently causes this is an older version of B or C do not have an explicit dependency on A, or do not constrain which version of A they want. So the solution of the dependency graph uses the older version so that all the constraints can be satisfied.


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§