grizzly rc1, swift: cant list and get user meters

Bug #1162976 reported by Tomasz Wanczyk
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ceilometer
Invalid
Undecided
Unassigned

Bug Description

tomek@tomek-VGN-BZ12VN:~$ curl http://192.168.2.111:8777/v1/users
{
  "users": [
    null,
    "9b38dc54ec594fc1863c959818c21ab5"
  ]
}tomek@tomek-VGN-BZ12VN:~$

tomek@tomek-VGN-BZ12VN:~$ curl http://192.168.2.111:8777/v1/users/9b38dc54ec594fc1863c959818c21ab5/meters
{
  "meters": []

tomek@tomek-VGN-BZ12VN:~$ curl http://192.168.2.111:8777/v1/users/9b38dc54ec594fc1863c959818c21ab5/meters/storage.objects.outgoing.bytes

{
  "events": [
    {
      "counter_name": "storage.objects.outgoing.bytes",
      "project_id": "ea58a69c5d9c48ca880e677d33cc40c7",
      "user_id": "9b38dc54ec594fc1863c959818c21ab5",
      "resource_id": "ea58a69c5d9c48ca880e677d33cc40c7",
      "timestamp": "2013-04-01T18:43:41.531000",
      "message_signature": "b8dde4b4371cce57cfa5aa381c4087e39ee4519edc37f023118d0f00dc5c093a",
      "message_id": "12fc0a98-9afc-11e2-8255-080027820217",
      "source": "openstack",
      "counter_unit": "B",
      "counter_volume": 2,
      "resource_metadata": {
        "path": "/v1/AUTH_ea58a69c5d9c48ca880e677d33cc40c7",
        "version": "v1",
        "container": null,
        "object": null
      },
      "counter_type": "delta"
    },
    {
      "counter_name": "storage.objects.outgoing.bytes",
      "project_id": "ea58a69c5d9c48ca880e677d33cc40c7",
      "user_id": "9b38dc54ec594fc1863c959818c21ab5",
      "resource_id": "ea58a69c5d9c48ca880e677d33cc40c7",
      "timestamp": "2013-04-01T18:43:41.261000",
      "message_signature": "531cc7308618e549d4fec77f2aa2a23c4b150b3f576cd9242a9968041b1e76dd",
      "message_id": "12d3f47c-9afc-11e2-8255-080027820217",
      "source": "openstack",
      "counter_unit": "B",
      "counter_volume": 50,
      "resource_metadata": {
        "path": "/v1/AUTH_ea58a69c5d9c48ca880e677d33cc40c7",
        "version": "v1",
        "container": null,
        "object": null
      },
      "counter_type": "delta"
    },

....

    {
      "counter_name": "storage.objects.outgoing.bytes",
      "project_id": "ea58a69c5d9c48ca880e677d33cc40c7",
      "user_id": "9b38dc54ec594fc1863c959818c21ab5",
      "resource_id": "ea58a69c5d9c48ca880e677d33cc40c7",
      "timestamp": "2013-04-01T19:54:03.220000",
      "message_signature": "9b0d38bf4d8a3a07d6374e2bf27e0263bb4660f00fbea1dc75a6000e50c60bfe",
      "message_id": "e74c91a6-9b05-11e2-8255-080027820217",
      "source": "openstack",
      "counter_unit": "B",
      "counter_volume": 154,
      "resource_metadata": {
        "path": "/v1/AUTH_ea58a69c5d9c48ca880e677d33cc40c7/default/test3.pl",
        "version": "v1",
        "container": "default",
        "object": "test3.pl"
      },
      "counter_type": "delta"
    }
  ]
}tomek@tomek-VGN-BZ12VN:~$

Julien Danjou (jdanjou)
tags: added: grizzly-rc-potential
Revision history for this message
Jason (zzs) wrote :

I cannot re-produce this bug, can you provide more information.

Changed in ceilometer:
status: New → Incomplete
Revision history for this message
Julien Danjou (jdanjou) wrote :

We don't seem to have a unit test on this, I didn't investigate more but I'm curious. Which storage backend are you using?

Revision history for this message
Tomasz Wanczyk (twanczyk) wrote :
Download full text (6.2 KiB)

Hi Julien,

I am using mongo storage. This is not only rc1 bug. The same is with earlier version as well: ceilometer-2013.1.a77.gf2ba3ef-py2.7.egg and swift 1.7.6.

> db.resource.find()
{ "_id" : "1e75f61ae18c41f7b57a66e9c20f1289", "metadata" : null, "meter" : [ { "counter_name" : "storage.objects.containers", "counter_unit" : "container", "counter_type" : "gauge" }, { "counter_name" : "storage.objects", "counter_unit" : "object", "counter_type" : "gauge" }, { "counter_name" : "storage.objects.size", "counter_unit" : "B", "counter_type" : "gauge" } ], "project_id" : "1e75f61ae18c41f7b57a66e9c20f1289", "source" : "openstack", "user_id" : null }
{ "_id" : "4c10bd388cc241a5b9e5ee129daad2e5", "metadata" : null, "meter" : [ { "counter_name" : "storage.objects.containers", "counter_unit" : "container", "counter_type" : "gauge" }, { "counter_name" : "storage.objects", "counter_unit" : "object", "counter_type" : "gauge" }, { "counter_name" : "storage.objects.size", "counter_unit" : "B", "counter_type" : "gauge" } ], "project_id" : "4c10bd388cc241a5b9e5ee129daad2e5", "source" : "openstack", "user_id" : null }
{ "_id" : "91a45cf14ce94ccabd32270ae0056b1f", "metadata" : null, "meter" : [ { "counter_name" : "storage.objects.containers", "counter_unit" : "container", "counter_type" : "gauge" }, { "counter_name" : "storage.objects", "counter_unit" : "object", "counter_type" : "gauge" }, { "counter_name" : "storage.objects.size", "counter_unit" : "B", "counter_type" : "gauge" } ], "project_id" : "91a45cf14ce94ccabd32270ae0056b1f", "source" : "openstack", "user_id" : null }
{ "_id" : "a5082ee75e8c42e8ad11ac8f44de15ad", "metadata" : null, "meter" : [ { "counter_name" : "storage.objects.containers", "counter_unit" : "container", "counter_type" : "gauge" }, { "counter_name" : "storage.objects", "counter_unit" : "object", "counter_type" : "gauge" }, { "counter_name" : "storage.objects.size", "counter_unit" : "B", "counter_type" : "gauge" } ], "project_id" : "a5082ee75e8c42e8ad11ac8f44de15ad", "source" : "openstack", "user_id" : null }
{ "_id" : "ea58a69c5d9c48ca880e677d33cc40c7", "metadata" : null, "meter" : [ { "counter_name" : "storage.objects.outgoing.bytes", "counter_unit" : "B", "counter_type" : "delta" }, { "counter_name" : "storage.objects.containers", "counter_unit" : "container", "counter_type" : "gauge" }, { "counter_name" : "storage.objects", "counter_unit" : "object", "counter_type" : "gauge" }, { "counter_name" : "storage.objects.size", "counter_unit" : "B", "counter_type" : "gauge" } ], "project_id" : "ea58a69c5d9c48ca880e677d33cc40c7", "source" : "openstack", "user_id" : null }
> db.project.find()
{ "_id" : "ea58a69c5d9c48ca880e677d33cc40c7", "source" : [ "openstack" ] }
{ "_id" : "1e75f61ae18c41f7b57a66e9c20f1289", "source" : [ "openstack" ] }
{ "_id" : "4c10bd388cc241a5b9e5ee129daad2e5", "source" : [ "openstack" ] }
{ "_id" : "91a45cf14ce94ccabd32270ae0056b1f", "source" : [ "openstack" ] }
{ "_id" : "a5082ee75e8c42e8ad11ac8f44de15ad", "source" : [ "openstack" ] }
> db.user.find()
{ "_id" : "9b38dc54ec594fc1863c959818c21ab5", "source" : [ "openstack" ] }
{ "_id" : null, "source" : [ "...

Read more...

Revision history for this message
Julien Danjou (jdanjou) wrote :

{ "_id" : ObjectId("5159d5701d41c808ad17127f"), "counter_name" : "storage.objects.size", "user_id" : null, "message_signature" : "cf371047a7aeb16d16dba80f65a0d3e94c347f906f0b88322db24fd23b47c290", "timestamp" : ISODate("2013-04-01T18:43:53Z"), "resource_id" : "ea58a69c5d9c48ca880e677d33cc40c7", "resource_metadata" : null, "source" : "openstack", "counter_unit" : "B", "counter_volume" : 109425, "project_id" : "ea58a69c5d9c48ca880e677d33cc40c7", "message_id" : "1a72e472-9afc-11e2-ab5b-080027820217", "counter_type" : "gauge" }

user_id is null, that happens if we can't get the user id set by Keystone.

What do you as auth_token in your swift.conf?

tags: removed: grizzly-rc-potential
Revision history for this message
Tomasz Wanczyk (twanczyk) wrote :

auth-token is set in proxy-server.conf, and it is ok if I can use swift as particular user, swift.conf includes swift-hash settings

Revision history for this message
Tomasz Wanczyk (twanczyk) wrote :

there is the same problem on devstack and it looks like related to ceilometer-agent-central

Revision history for this message
Julien Danjou (jdanjou) wrote :

I don't doubt that auth_token is OK, I just doubt that you're using the right version actually, that's why I asked for your auth_token line actually.

Now, if the problem is on devstack too, there may be an issue somewhere we miss in this middleware.

Revision history for this message
gordon chung (chungg) wrote :

in swift pollsters, we don't get user_id which is why storage.objects, storage.objects.size, storage.objects.containers have user_id=None and why i'd assume they aren't visible in user meter list

storage.objects.incoming.bytes, storage.objects.outgoing.bytes are triggered by swift api calls which gives us a user_id.

Revision history for this message
gordon chung (chungg) wrote :

i'm going on to mark this invalid... please reopen if the above comment isn't accurate. also v1 api has been deprecated.

Changed in ceilometer:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.