Reload node attributes


Hi all!

Is there any valid way to reload all node attributes from recipe

I’m running a rather complicated setup and I’m stuck into problem
Two chef-clients are starting at two nodes at the same time. One node
should wait for second one. The second will hang an attribute, which
the first is polling.

Something like this:
def wait_for n, attrib, timeout=300, timechunk=10
if n "Starting to wait #{}[:#{attrib}]…"
until n.attribute?(attrib) do
if (>=timeout
Chef::Log.error "Timeout exceeded while waiting
for #{n}[:#{attrib}]…"
exit 1
sleep timechunk
end "Got #{n[:name]}[:#{attrib}]…"
Chef::Log.error "Invalid node!"
exit 1


The problem is - ‘n’ doesn’t update. Is there a method to read it again?

With best regards
Eugene Suchkov