- From: Dan Crosta <
>
- To:
- Subject: [chef] Does chef-solo treat node.set differently than chef-client?
- Date: Sat, 4 Aug 2012 17:18:57 -0400
A user reported a bug [1] against one of my cookbooks that has me stumped:
one of my LWRPs accumulates state by setting node attributes using something
like node.set["foo"]["bar"] = "baz". This state is later used in a template.
With chef-client, this works as expected -- the attribute is set and readable
(as node["foo"]["bar"]) at the time the template is evaluated. With
chef-solo, the attribute is set, and I can verify by .inspect'ing the
attribute in a Chef::Log.debug message (it shows up under @current_normal);
however, when the template renders, it is as though the attribute had never
been set at all. More puzzling, if I change the node.set to a node.default,
it works correctly.
I am completely baffled by this behavior -- is it expected? Is it a bug in
chef-solo? Or a bug in my LWRP or recipe? Any help would be appreciated.
- Dan
[1]
https://github.com/dcrosta/cookbook-simple-iptables/issues/5
- [chef] Does chef-solo treat node.set differently than chef-client?, Dan Crosta, 08/04/2012
Archive powered by MHonArc 2.6.16.