[chef] Re: Re: Fw: [[chef-dev]] Will attribute merge ordering fix for nested roles be merged in 0.10.0?


Chronological Thread 
  • From: Jonathan Matthews < >
  • To:
  • Subject: [chef] Re: Re: Fw: [[chef-dev]] Will attribute merge ordering fix for nested roles be merged in 0.10.0?
  • Date: Fri, 18 Mar 2011 10:27:10 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=jpluscplusm.com; s=google; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=Dgv8OWxfZJKaRHgeEKPo3dqtorK5X2A9KnX5GPlYBdmxbfASKr91xitzFOH6eHKdha E+SpgwntBjk9OHtiXDSZmmvRRIyQyYKEfvoI00co1YUPBhoGSWf4b9V1zpOfa9lLY1xW kVWVKZZ9LgBKZiuty5iEkcztIXEc1MPCDc420=

On 18 March 2011 01:13, Rob Guttman 
< >
 wrote:
> 7 should win.  I just ran into this problem this week.  I solved it by
> 'demoting' the base's attribute to default and keeping the appserver's
> attribute as override - but that was very much a workaround to achieve the
> desired (and expected) behavior.

I've been using an annoying workaround which, none the less, will
allow me to automagically back itself out once the underlying
behaviour's fixed.

Each Role, no matter how trivial, has an associated
"#{role.name}-ATTR" Role. All Attributes are assigned in Role-ATTR.
All Role inclusions are done by the main Role, which also includes
Role-ATTR in /last/ place in its runlist.

This fixes the attribute ordering problem, and will allow me to do a
global, scripted "move all attributes from -ATTR to $role and delete
$role-ATTR from $role's runlist" once the underlying behaviour's
fixed.

It looks complicated (which it isn't) and annoying (which it is) but
it's the only way I could see to fix the problem in a nested
Role-in-Role structure and then back the workaround out without much
manual work down the line.

Jonathan
-- 
Jonathan Matthews
London, UK
http://www.jpluscplusm.com/contact.html



Archive powered by MHonArc 2.6.16.

§