A user reported a bug  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.