Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Chef executes recipes with a two pass model: First it compiles each resource/provider by walking through the run list. Then it converges each of the compiled resource/providers to perform work.

While I (finally) understand how it works; I don't understand the why. It seems like there are quite a few pitfalls w/ this model:

  • It is very easy to execute tasks out of order by accidentally inlining work (forgetting to use execute/ruby_block providers, etc)

  • LWRPs that declare inline resources have a confusingly different execution order (their actions occur in the convergence phase, but any resources they declare get run after the current provider)

  • It is not very obvious to newcomers.

What are the benefits of this two pass architecture? Why was Chef built this way? (I'm not finding obvious docs on it)

share|improve this question
1  
Isn't that question better suited for a Chef mailing list or forum? – daff Jan 29 at 1:50
Good call! I've just sent it to the chef mailing list. However, isn't this also a good question for server fault for anyone else who might be interested in it? – Nevir Jan 29 at 2:19
1  
It sure is, but it is a question on design decisions specific to Chef so you might not find many people here who able to answer it. – daff Jan 29 at 4:27
@Nevir pls include a link – cstamas Feb 17 at 0:48

closed as off topic by John Gardeniers, Ward, mdpc, Khaled, Brent Pabst Jan 29 at 8:53

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

Browse other questions tagged or ask your own question.