Recipe, recipes and loaded_recipes (CHEF-3645)


#1

Do you ever search for [role] or [recipe] instead of [roles] and [recipes]?
Why? Would you be traumatized if these went away (because they’re
confusing) in Chef 11 and you had to look through the nodes run_list?

Do you use node[:recipes] and run_state[:seen_recipes] in a cookbooks to
determine if a recipe is in the expanded run list but hasn’t been seen yet?
Would you hold it against me if node[:recipes] contained the recipes that
had been seen/loaded so far (and the final list of all recipes at the end
of the run, including ones from include_recipe), instead of the expanded
run_list?

Thoughts?

Bryan


#2

Hi,

On Wed, Dec 5, 2012 at 12:51 PM, Bryan McLellan btm@loftninjas.org wrote:

Do you use node[:recipes] and run_state[:seen_recipes] in a cookbooks to
determine if a recipe is in the expanded run list but hasn’t been seen yet?
Would you hold it against me if node[:recipes] contained the recipes that
had been seen/loaded so far (and the final list of all recipes at the end
of the run, including ones from include_recipe), instead of the expanded
run_list?

Thoughts?

+10


Cheers,

Peter Donald


#3

On Tue, Dec 4, 2012 at 9:02 PM, Peter Donald peter@realityforge.org wrote:

+10

I’m going to presume that means you’d like to see that proposal happen,
rather than you are really^10 going to be grumpy at me. :smiley:

Bryan


#4

On Wed, Dec 5, 2012 at 1:08 PM, Bryan McLellan btm@loftninjas.org wrote:

On Tue, Dec 4, 2012 at 9:02 PM, Peter Donald peter@realityforge.orgwrote:

+10

I’m going to presume that means you’d like to see that proposal happen,
rather than you are really^10 going to be grumpy at me. :smiley:

Indeed. We would love to see this included. It is particularly important
when we are auditing which cookbooks are on which node and what not. In
particular
what we have in a recipe, (derived from the knife audit plugin) is as
follows. It would be nice to eliminate the need for this.

ruby_block “get_seen_recipes” do
block do
node.override[“knife_audit”][“seen_recipes”] =
node.run_state[:seen_recipes]
end
action :create
end


Cheers,

Peter Donald


#5

We search for “role” only because I read somewhere that searching against
"roles" is much more expensive. But it has bitten us before.

While I wouldn’t mind if “role” went away, I’d want to know that the
performance of searching for “roles” wasn’t going to be awful.

  • Julian

On Tue, Dec 4, 2012 at 8:51 PM, Bryan McLellan btm@loftninjas.org wrote:

Do you ever search for [role] or [recipe] instead of [roles] and
[recipes]? Why? Would you be traumatized if these went away (because
they’re confusing) in Chef 11 and you had to look through the nodes
run_list?

Do you use node[:recipes] and run_state[:seen_recipes] in a cookbooks to
determine if a recipe is in the expanded run list but hasn’t been seen yet?
Would you hold it against me if node[:recipes] contained the recipes that
had been seen/loaded so far (and the final list of all recipes at the end
of the run, including ones from include_recipe), instead of the expanded
run_list?

Thoughts?

Bryan


[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


#6

On Tuesday, December 4, 2012 at 8:30 PM, Julian C. Dunn wrote:

We search for “role” only because I read somewhere that searching against “roles” is much more expensive. But it has bitten us before.

While I wouldn’t mind if “role” went away, I’d want to know that the performance of searching for “roles” wasn’t going to be awful.

  • Julian

Did anyone actually test this? I’d be shocked if there was a difference in performance that wasn’t completely swallowed up by noise.


Daniel DeLeo


#7

Searching against any key is no more expensive than any other - whoever
told you that is wrong.

Adam

On 12/4/12 8:30 PM, “Julian C. Dunn” jdunn@aquezada.com wrote:

We search for “role” only because I read somewhere that searching against
"roles" is much more expensive. But it has bitten us before.

While I wouldn’t mind if “role” went away, I’d want to know that the
performance of searching for “roles” wasn’t going to be awful.

  • Julian

On Tue, Dec 4, 2012 at 8:51 PM, Bryan McLellan
btm@loftninjas.org wrote:

Do you ever search for [role] or [recipe] instead of [roles] and
[recipes]? Why? Would you be traumatized if these went away (because
they’re confusing) in Chef 11 and you had to look through the nodes
run_list?

Do you use node[:recipes] and run_state[:seen_recipes] in a cookbooks to
determine if a recipe is in the expanded run list but hasn’t been seen
yet? Would you hold it against me if node[:recipes] contained the recipes
that had been seen/loaded so far (and
the final list of all recipes at the end of the run, including ones from
include_recipe), instead of the expanded run_list?

Thoughts?

Bryan


[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ http://sdf.org/1/users/keymaker/
* compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]