Arithmetic transformer not working on multiple meters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
High
|
Igor Degtiarov |
Bug Description
The poll_and_publish method of a PollingTask object (file agent.py) on each iteration gets the samples from the current pollster and injects them into the pipeline. Here, samples are transformed before getting published.
The arithmetic transformer needs to be applied on samples from every meters on which the transformer is defined. But in the poll_and_publish method, only samples from a single meter per iteration are polled (and fed to the arithmetic transformer), so I get this error:
"Unable to perform calculation, not all of {_disk_
Here is an extract from my pipeline.yaml file:
sources:
[...]
- name: disk_source
interval: 600
meters:
- "disk.read.bytes"
- "disk.read.
- "disk.write.bytes"
- "disk.write.
sinks:
- disk_sink
- disk_read_
[...]
sinks:
[...]
- name: disk_read_
transformers:
- name: "arithmetic"
[...]
Changed in ceilometer: | |
assignee: | nobody → Igor Degtiarov (idegtiarov) |
Changed in ceilometer: | |
milestone: | none → kilo-1 |
importance: | Undecided → High |
Changed in ceilometer: | |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | kilo-1 → 2015.1.0 |
I think it'd be a good thing to change the tests in pipeline_base that test transformers to use polling tasks, not pipelines directly, so this issue would surface there.
As for the fix, I'm thinking it'd probably be about grouping pollster_matches by source and then encompassing all of the pollsters for the same source in the same publish context.
Looking forward to reviewing the patch Igor :-)