- From: Michael Stillwell <
>
- To:
- Cc: Charles Duffy <
>
- Subject: [chef] Re: Re: How to set override attributes with "knife node edit"?
- Date: Tue, 8 Mar 2011 11:24:59 +0000
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=U+MIrY93P4iHV7xvAsvuBkvcvCIAHtnWvDmUKSmAnKPGVwVMr4G/cCGNCBDYGWwCbQ Tqi4mnoOb34biPtV8DmTcroBcv9GE1Y3zGAztiFl8pwX8/0GpsnFWE0kGxLgdLrb1uuH Waoj/olYa/X7mNUQtYVD4hZc9GIC6EBhrfR7w=
The table at the top of the attributes documentation also strongly
suggests that setting "override" or "default" precedence on a node
will have an affect and/or be useful--there's a column headed "Node or
Recipe", and the corresponding "override" row gives it the highest
possible precedence, so it was a bit surprising to discover that
"override" on a node actually does nothing.
See
http://wiki.opscode.com/display/chef/Attributes#Attributes-SettingAttributes
Michael
On Sun, Mar 6, 2011 at 9:28 PM, Charles Duffy
<
>
wrote:
>
Attributes in the node definition should be set at the "normal" level.
>
Admittedly, the docs do a fairly poor job of indicating as much (using the
>
word "typically" implies that other approaches are possible).
>
Sun, Mar 6, 2011 at 2:08 PM, Michael Stillwell
>
<
>
>
wrote:
>
>
>
> I'm having trouble getting "knife node edit" to behave as expected.
>
> I'm setting attributes on the key { "override": ... } within the JSON
>
> data structure however my changes aren't picked up during chef-client
>
> runs--indeed after running chef-client the attributes disappear from
>
> the data structure.
>
>
>
> That is, if I change, say, "override.foo.servers" and save the file
>
> the change is persisted to opscode in some way (if I immediately
>
> re-edit, I can see the change I made) however if I run chef-client on
>
> the node, it ignores the change I made, and somehow arranges for it to
>
> be deleted.
>
>
>
> How do the precedence "namespaces" within the "knife node edit" JSON
>
> data structure work? How do they correspond to attributes in the
>
> opscode web interface? (These have no precedence setting I can see--if
>
> I change something in the opscode interface, I am changing its
>
> "normal", "override" or "default" value?)
>
>
>
> I've read through
>
>
>
> http://wiki.opscode.com/display/chef/Attributes
>
>
>
> several times, but it doesn't explain what the "knife node edit" data
>
> structure represents, and what will happen if you edit different
>
> areas. (e.g. I assume editing the "automatic" section does nothing.)
>
>
>
>
>
>
>
>
>
> Thanks,
>
> Michael
>
>
--
http://beebo.org
Archive powered by MHonArc 2.6.16.