Regression in recipe_eval in 10.14?


#1

Hi all,

I’m seeing something that I believe is a regression in 10.14 related to why-run.

I’ve filed http://tickets.opscode.com/browse/CHEF-3493

See https://github.com/andreacampi/reval for a simple way to reproduce it.

Any idea?

Andrea


#2

On Mon, Oct 1, 2012 at 3:55 AM, Andrea Campi
andrea.campi@zephirworks.com wrote:

I’m seeing something that I believe is a regression in 10.14 related to why-run.

Yeah, I recognize this yak from working on the deploy provider.

#converge_by adds actions to the @converge_actions instance in the
/provider/ instance, not in a common parent like the run context.

I spent almost all day trying to make sense of this.

  1. RevalBroken[‘broken’] (LWRP) is converged.

It creates ruby_block[“broken before_deploy”] which is added to the
resource collection.

It has no converge_by blocks, so it has no ConvergeActions.

  1. ruby_block[“broken before_deploy”] is converged.

Calling the code block is in converge_by, so it gets added to
ruby_block[“broken before_deploy”].converge_actions.

We run that converge_action.

  1. recipe_eval is called.

recipe_eval wraps instance_eval (which all happens as a separate chef
run) in a converge_by block, which gets added to:
RevalBroken[‘broken’]

Note that we’ve already run that providers converge_actions, so the
actual recipe_eval converge_action never happens.

I’m still having a hard time following why this is true.

Bryan


#3

On Mon, Oct 1, 2012 at 11:31 PM, Bryan McLellan btm@loftninjas.org wrote:

On Mon, Oct 1, 2012 at 3:55 AM, Andrea Campi
andrea.campi@zephirworks.com wrote:

I’m seeing something that I believe is a regression in 10.14 related to why-run.

Yeah, I recognize this yak from working on the deploy provider.

#converge_by adds actions to the @converge_actions instance in the
/provider/ instance, not in a common parent like the run context.

I spent almost all day trying to make sense of this.

Fun stuff, isn’t it? :slight_smile:

On my side, I’m scratching my head trying to decide if I really need
this complexity, and whether I should get rid of the use of
recipe_eval or the block. Multiply this for all the application_*
cookbooks that I would need to re-test, and I’ve got my work cut out
for me…

Oh well, at least it’s an excuse to write kitchen tests for all of them :smiley:

Andrea