Setting a node attribute from chef_handler does not work for me

So I have a handler that lists all of the cookbooks used in a run. The handler works perfectly except that when I try to update a node resource i.e.

Node.default[“recipe_details”][recipe_name] = recipe_version

It does not make it to the node’s metadata.

Am I missing something ?

I can read node resources just fine from the handler, but setting attributes just does NOT work.
I used chef-client versions 11.6.X and 12.4.X and nothing happens…

Any help would be appreciated.

You mean during the run or you want to save the data permanently to the
node? If you want to save it you need to use node.set/node.normal as that
persists to the node object, whereas node.default does not.

If you mean in run, then I’m not sure, but did you try ‘node’ instead of

My initial post said I was using Node.default but in fact I am using node.default when I change it to Chef::Node I get an error. I have to look at the documentation but so far no luck with node.normal or node.set

Can I Interchangeably use Chef::Node ? If so what is the method to use to assign ?

Thanks for the Input.