[chef] Re: Re: Re: Re: Re: Re: Re: Re: Nested node attributes not working as expected when using overrides?


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: Nested node attributes not working as expected when using overrides?
  • Date: Mon, 22 Oct 2012 12:11:01 -0700

On Monday, October 22, 2012 at 10:36 AM, Torben Knerr wrote:
>
> Ah, thanks! CHEF-2936 is exactly what hits me. CHEF-1804 is weird as well,
> I'll try to keep that in the back of my head...
>
> As this behaviour is quite counter-intuitive, would you agree that a
> foodcritic rule would make sense here?
Yeah, a foodcritic rule would be nice. I was poking around in foodcritic recently and found that it doesn't detect some types of attribute access[0], so fixing that would be a good starting point. 

We intend to fix this for Chef 11, with the intention of allowing more logic (especially computed/derived attribute values and platform-specific attribute values) in attributes files so any foodcritic rule ought to branch on Chef version above/below 11.0.
 
>
> And a side question: what's the way to dump a node's "resolved" attributes?
> Is it possible via knife? I'm currently doing it via shef on the node...
>
> Cheers, Torben
Knife can give you a section of a node's attribute tree with the -a option, after chef client has run and saved that node's data. To expand the run_list and eval attributes, you're better off doing this on the node, since cookbooks could have platform branching logic which would set different attributes.

-- 
Daniel DeLeo

0. https://github.com/acrmp/foodcritic/issues/81



Archive powered by MHonArc 2.6.16.

§