Cannot use Aggregator Transformer with retention_time without also having size-based flush
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
Medium
|
Kevin McDonald | ||
Kilo |
Fix Released
|
Undecided
|
gordon chung | ||
Liberty |
Fix Committed
|
Undecided
|
gordon chung |
Bug Description
It appears that setting retention_time without setting size will cause samples to get flushed after 2 samples instead of when retention_time is reached because the default for size is 1. That seems like unintuitive behavior.
This is the example given for configuring an aggregator transformer using the retention time option:
---
transformers:
- name: "aggregator"
parameters:
---
This example does not work. It will always emit the aggregated samples that it has collected after it receives a second sample. This is because size defaults to 1.
Mitigations:
* If you only want aggregated samples to be flushed by a time-based metric then you'll have to set size to a sufficiently large value
Proposed fix:
I propose that this configuration should flush samples every 60 seconds, regardless of how many samples are collected:
---
transformers:
- name: "aggregator"
parameters:
---
Results in size = None, retention_time = 60 seconds
If neither size or retention_time is specified, the behavior should stay the same: size defaulting to one (no aggregation). I feel like this is incorrect behavior, but for the sake of backwards compatibility that behavior should stay the same:
---
transformers:
- name: "aggregator"
parameters:
---
Results in size = 1, retention_time = None
Obviously, specifying both retention_time and size should use both as criteria to trigger a flush:
---
transformers:
- name: "aggregator"
parameters:
size: 10
---
Results in size = 10, retention_time = 60 seconds
Ref:
description: | updated |
description: | updated |
Changed in ceilometer: | |
assignee: | nobody → Rohit Jaiswal (rohit-jaiswal-3) |
Changed in ceilometer: | |
importance: | Undecided → Medium |
Fix proposed to branch: master /review. openstack. org/264376
Review: https:/