- From: Larry Wright <
>
- To:
- Subject: [chef] Re: Recipes doing status checkins?
- Date: Thu, 29 Aug 2013 19:23:43 -0500
I've done this with a data bag. Just write to a 'progress' data bag at each
interval. As long as the data bag is only used for this purpose, there
shouldn't be any concurrency issues.
Node.save would work, but there's a race condition with nodes where if you
modify it during the chef run, you might overwrite changes that occurred
externally (like someone running knife node run_list add).
Hope this helps.
Larry
On Aug 29, 2013, at 3:50 PM, Brad Knowles
<
>
wrote:
>
Folks,
>
>
I'm curious to know what the current best practice is with regards to
>
keeping your central chef server updated with current run state information
>
as you go through a lengthy process? Do you have each recipe doing a
>
node.set on an attribute and then a node.save? If so, how "heavy" is a
>
node.save operation?
>
>
I know that we need to avoid writing to data bags, because they don't
>
support multiple simultaneous writers. However, other than using
>
attributes and doing a node.save, I can't think of any obvious way to have
>
my recipes storing centrally available information on their current runtime
>
status.
>
>
>
I wouldn't do this kind of thing for most normal recipes that are run on a
>
daily basis, but for lengthy install processes that should be done fairly
>
rarely, it would be nice to be able to have some sort of ongoing progress
>
information that could be fed back in near-realtime.
>
>
Thanks!
>
>
--
>
Brad Knowles
>
<
>
>
LinkedIn Profile: <http://tinyurl.com/y8kpxu>
>
Archive powered by MHonArc 2.6.16.