cached resource can not update metric unit

Bug #1682367 reported by liyi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Won't Fix
Undecided
Unassigned

Bug Description

I use memcache to cache resource in ceilometer.

The resource metric unit will store into db when ceilometer to process the first metric of resource and cached the resource into memcache. But the metric unit didn't define in gnocchi_resource.yaml, so metric unit didn't store into indexer.

When we use 'gnocchi metric list' command to show metric list, many metric have None unit like follow:
[root@jycompute121 ~]# gnocchi metric list
+--------------------------------------+---------------------+-------------------------------+------------+--------------------------------------+
| id | archive_policy/name | name | unit | resource_id |
+--------------------------------------+---------------------+-------------------------------+------------+--------------------------------------+
| 023a30a1-3b3f-48e5-a23a-2f15033156c9 | medium | disk.write.bytes.rate | None | c424c6af-27aa-4a05-b1ca-9ed31d2d6137 |
| 028d2635-2eb9-405d-9ac1-3528677e5651 | medium | disk.read.bytes.rate | None | 5d015867-e9c3-42ae-9aba-7cbac937f2b5 |
| 04fac6c2-20f1-4457-8731-de57bf7be56c | medium | disk.write.requests.rate | None | c424c6af-27aa-4a05-b1ca-9ed31d2d6137 |
| 0c2f5616-5e9d-41fd-beaf-c62b4b6a8bef | medium | memory.usage | MB | 2be8fc15-3764-48e1-b7da-d3e6aa71821f |
| 0d6c8fc8-fc03-492b-b727-66af125bb7d0 | medium | memory.usage | MB | 601f646a-9862-4853-9a2c-bc3b6f0fd9f5 |
| 0f266e6f-6ee4-4993-abde-4a65fe1396ad | medium | disk.read.requests.rate | request/s | 9be48877-ad28-46a8-bed5-0b102a414950 |
| 13b5da44-d3fe-4512-8b92-7703fba13423 | medium | memory.usage | MB | 5d015867-e9c3-42ae-9aba-7cbac937f2b5 |
| 1575fb57-c928-4758-8547-dbceb5a30e70 | medium | network.outgoing.bytes.rate | B/s | 6d248d01-ea75-52be-a217-3d505b2f458b |
| 176b564d-f7dd-4aba-ae82-0de615d9b12a | medium | cpu_util | None | 5d015867-e9c3-42ae-9aba-7cbac937f2b5 |
| 17dd9815-9be8-434a-851e-0a7b221e44c5 | medium | disk.read.bytes.rate | B/s | d9c28c70-5142-4a10-b5f3-ef6235a97d38 |
| 1e0b62c7-ee18-4ce2-9b64-b58faa82b98f | medium | network.outgoing.bytes.rate | B/s | 1f1e4daf-865f-5062-883a-fe75f00d5010 |

I analyzed this issue, cache info filtered metic, so only resource is updated we need to restore metric, code:
https://github.com/openstack/ceilometer/blob/master/ceilometer/dispatcher/gnocchi.py#L458-L465

If disable cache, its ok.

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

this isn't really about cache, unit is attached to metric, not resource. this use case is debatable because i don't really see why you need to update metric definition. if you update metric definition, you are really just creating a new metric (except in this case maybe)

to be honest, i don't know if this is worth supporting. it seems wrong to assume metric with same name and different unit is the same metric series, or another series using a different resolution.

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

marking as won't fix, please reopen if you think this bug is not what i described.

Changed in ceilometer:
status: New → Won't Fix
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.