[openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

Sandy Walsh sandy.walsh at rackspace.com
Mon Aug 19 13:22:19 UTC 2013



On 08/19/2013 09:40 AM, Julien Danjou wrote:
> On Mon, Aug 19 2013, Sandy Walsh wrote:
> 
>> On 08/19/2013 05:08 AM, Julien Danjou wrote:
>>> On Sun, Aug 18 2013, Jay Pipes wrote:
>>>
>>>> I'm proposing that in these cases, a *new* resource would be added to the
>>>> resource table (and its ID inserted in meter) table with the new
>>>> flavor/instance's metadata.
>>>
>>> Ah I see. Considering we're storing metadata as a serialized string
>>> (whereas it's a dict), isn't there a chance we fail?
>>> I'm not sure about the idempotence of the JSON serialization on dicts.
>>
>> Yeah, using a json blob should only be for immutable data. I'm assuming
>> metadata can change so we'd need idempotence. I could easily see two
>> pipelines altering metadata fields. Last write wins. :(
> 
> No, actually I'm not worried about that, it would work as described by
> Jay. It's just that I'm not sure that we can assert json.dumps(somedict)
> returns always the same string.
> 


Gotcha. I think that's fine though. We're going to get that with a
frequently changing resource. So long as we have a common UUID (from the
source system), the database ID can change all it wants.



More information about the OpenStack-dev mailing list