Comment 3 for bug 1203699

Revision history for this message
Mehdi Abaakouk (sileht) wrote :

image properties are in the database
the query works, it return only sample with metadata.properties.toto=toto but the returned json don't have this metadata

Same query in mongo:

MongoDB shell version: 2.4.5
connecting to: ceilometer
> db.meter.findOne({'counter_name':'image', 'resource_metadata.properties.toto':'toto'})
{
 "_id" : ObjectId("51ed36f8eb0a1975fedb9620"),
 "counter_name" : "image",
 "user_id" : null,
 "message_signature" : "fe9515719b66d0840db5ed5f58834389ee13a7c0c8caf711cc2dbd9aa90aeede",
 "timestamp" : ISODate("2013-07-22T13:43:20Z"),
 "resource_id" : "aa4a7285-986b-4dff-bd59-bf7f9665b109",
 "resource_metadata" : {
  "status" : "active",
  "name" : "cirros-0.3.1-x86_64-uec",
  "deleted" : false,
  "container_format" : "ami",
  "created_at" : "2013-07-22T07:40:58",
  "disk_format" : "ami",
  "updated_at" : "2013-07-22T09:24:12",
  "properties" : {
   "kernel_id" : "38dd825b-3b08-4cb2-9f1c-76b207c74f0e",
   "ramdisk_id" : "705c0c2a-2d3e-4da4-8740-4382bb56f8f6",
   "toto" : "toto"
  },
  "protected" : false,
  "checksum" : "f8a2eeee2dc65b3d9b6e63678955bd83",
  "min_disk" : 0,
  "is_public" : true,
  "deleted_at" : null,
  "min_ram" : 0,
  "size" : 25165824
 },
 "source" : "openstack",
 "counter_unit" : "image",
 "counter_volume" : 1,
 "project_id" : "a61f3c429ef5401d82d0e6b59fb276a4",
 "message_id" : "abfc6cc6-f2d4-11e2-ac72-00163ef7ca5e",
 "counter_type" : "gauge"
}