Libraries loaded twice?


#1

I was under the impression that:

  • libraries are only loaded once, when the cookbook is evaluated
  • each cookbook is evaluated only once

however, i recently ran into a problem where my library code was running
twice because:

  • my cookbook was both included in a role’s run_list
  • a different cookbook in that run list explicitly depended on that cookbook

this is using chef-solo 11.4.0. is this a bug in chef? or am i missing
something?

–igor


#2

I think this is caused by a bug that was fixed in 11.6 or 11.8.


Daniel DeLeo

On Tuesday, November 26, 2013 at 2:08 PM, Igor Serebryany wrote:

I was under the impression that:

  • libraries are only loaded once, when the cookbook is evaluated
  • each cookbook is evaluated only once

however, i recently ran into a problem where my library code was running twice because:

  • my cookbook was both included in a role’s run_list
  • a different cookbook in that run list explicitly depended on that cookbook

this is using chef-solo 11.4.0. is this a bug in chef? or am i missing something?

–igor