[chef] Re: How to set override attributes with "knife node edit"?


Chronological Thread 
  • From: Charles Duffy < >
  • To:
  • Subject: [chef] Re: How to set override attributes with "knife node edit"?
  • Date: Sun, 6 Mar 2011 15:28:34 -0600

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




Archive powered by MHonArc 2.6.16.

§