-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tier selection when using different units. #13593
Fix tier selection when using different units. #13593
Conversation
This pull request is not mergeable. Please rebase and repush. |
dfaa42f
to
4656fac
Compare
@miq-bot remove_label wip, unmergeable |
4656fac
to
bb2a2cf
Compare
bb2a2cf
to
84fa4e5
Compare
Ping, any idea? |
@miq-bot what's up? |
Let's have it really strict and check interval boundaries.
Interestingly, the math for tiers was broken from day zero. In most cases however, rate_adjustoment=1, so this came unnoticed. This makes the new test green again.
84fa4e5
to
671628d
Compare
Checked commits isimluk/manageiq@9e8094e~...671628d with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks!!! |
The problem was
Rates are tiered. Tier is selected based on the metrics' value.
When metric value and tier boundaries were in different units (metric in bytes, tiers in gigabytes), the tier selection was broken. We used
/
operator instead of*
.Cause
This problem existed since the day 0. It became just more visible after recent refactoring in #13331. I noticed that on one ocasion we had
value * rate_adjustment
and on another occasion we hadvalue / rate_adjustment
. That begged for investigation.@miq-bot add_label chargeback, wip, bug
@miq-bot assign @gtanzillo