[chef] Re: Data Bag Meta Data


Chronological Thread 
  • From: John Keiser < >
  • To:
  • Subject: [chef] Re: Data Bag Meta Data
  • Date: Tue, 17 Jun 2014 15:09:43 -0700

I don't believe the API has a way to do this.  However, if your main pain point is the time it takes to process the data bag (rather than the time it takes to retrieve it), you can get the checksum of a string like this:

require 'digest/md5'
Digest::MD5.hexdigest(str)

In that case, you could download the data bag items, checksum them, and compare with the last time you processed.

I know that there are upcoming APIs that will probably help with this.

--John


On Tue, Jun 17, 2014 at 3:02 PM, JOHN HASTY < " target="_blank"> > wrote:

Is there a way to obtain the meta data of a data bag object? For example, a way to get the time stamp of the last update or a check sum of the object.

I have hundreds of nodes that will be processing the elements of the data bag, which could be hundreds, and I want a way to filter out those which have already been processed. If the data bag item had been changed since the last run, I want to make sure it is processed.



JOHN HASTY
Software as a Service - DevOps
Software Group


Phone: 1-512-804-9968
E-mail:
  " target="_blank">
IBM

2407 S Congress Ave Ste E-350
Austin, TX 78704
United States





Archive powered by MHonArc 2.6.16.

§