- From: "John E. Vincent (lusis)" <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: node.save?
- Date: Fri, 9 Sep 2011 10:32:28 -0400
On Fri, Sep 9, 2011 at 8:04 AM, Denis Barishev
<
>
wrote:
>
On 09/09/2011 03:55 PM, Ranjib Dey wrote:
>
>
>
> node.save is not invoked if the run fails, but i guess we can hack it
>
> inside a report handler and save it there.
>
>
>
>
Okay good. But I think we'd better explicitly call node.save inside a recipe
>
(as others do it) if we expect fails latter in recipe... It's not good a
>
good practice to persist data of a node failed to run.
>
>
Denis
>
>
It's probably worth noting that this behavior is different from 0.9 to
0.10. In 0.9, nodes were saved at the beginning of the run. In 0.10,
nodes are not saved unless a run is successful.
If you absolutely need the node saved (so that it's available as a
search result on another node for instance) then, yes, calling
node.save is warranted. As you said though, it's important that you
only call node.save at the point where the system is in a state where
it's can perform whatever function is needed that makes it usable as a
search result. This can get annoying because it means, in something
like the case of MySQL, you need to ensure that services are starting
immediately as opposed to delayed till the end of the run.
It's much better, imho, those more advanced sort of interactions
outside of Chef or to employ some sort of blocking in another client's
run.
Archive powered by MHonArc 2.6.16.