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

Julien Danjou julien at danjou.info
Mon Aug 19 12:40:15 UTC 2013


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.

-- 
Julien Danjou
;; Free Software hacker ; freelance consultant
;; http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130819/e5340364/attachment.pgp>


More information about the OpenStack-dev mailing list