Update Provisioning Improvements
During the implementation phase of the Provisioning Improvements specs an error in the calculation formula of the merged spec was discovered, so the patch used the formula from a previous revision of the spec patch. The implementation also diverged in not adding a new configuration option but overloading the existing one to support the `auto` option. This patch updates the Provisioning Improvements specs to match the implementation from change id If30bb6276f58532c0f78ac268544a8804008770e Change-Id: Id4b7aa252ad0404d3038a1279e0d673a0809c7e8
This commit is contained in:
parent
1c47dd0690
commit
6dd5d605c1
@ -315,34 +315,37 @@ reporting the `allocated_capacity_gb` field.
|
||||
Automatic over subscription ratio calculation
|
||||
---------------------------------------------
|
||||
|
||||
To allow automatic over subscription ratio calculation we will add a new
|
||||
configuration option named `auto_max_over_subscription_ratio` that will
|
||||
instruct Cinder to use configured `max_over_subscription_ratio` as a starting
|
||||
To allow automatic over subscription ratio calculation we will make existing
|
||||
configuration option `max_over_subscription_ratio` into a polymorphic option
|
||||
that accepts not only integers and floats, but also a new string value `auto`
|
||||
that will instruct Cinder to use our default value of 20 as the starting
|
||||
reference when the backend is empty and then, when there is data calculate the
|
||||
current value on each driver stats report with the following formula::
|
||||
|
||||
adjusted_total = `total_capacity_gb` x (1 - (`reserved_percentage` / 100.0))
|
||||
ratio = `provisioned_capacity_gb` / adjusted_total - `free_capacity_gb`
|
||||
ratio = 1 + (`provisioned_capacity_gb` /
|
||||
(`total_capacity_gb` - `free_capacity_gb` + 1))
|
||||
|
||||
If the driver is not reporting `provisioned_capacity_gb` then we'll proceed to
|
||||
use the `allocated_capacity_gb` instead::
|
||||
|
||||
adjusted_total = `total_capacity_gb` x (1 - (`reserved_percentage` / 100.0))
|
||||
ratio = `allocated_capacity_gb` / adjusted_total - `free_capacity_gb`
|
||||
ratio = 1 + (`allocated_capacity_gb` /
|
||||
(`total_capacity_gb` - `free_capacity_gb` + 1))
|
||||
|
||||
This new configuration option will be independent of the drivers and it will be
|
||||
part of Cinder's core code, so if `auto_max_over_subscription_ratio` is not
|
||||
defined or set to `False` then Cinder will continue behaving as it is now
|
||||
(returning the `max_over_subscription_ratio` that is reported by the driver or
|
||||
the one configured by default if not present). But if it is set to True it
|
||||
will always return calculated ratio as explained.
|
||||
We are not considering the reserved capacity in this formula because the
|
||||
scheduler's capacity filter already takes it into consideration when
|
||||
calculating the virtual free capacity.
|
||||
|
||||
There are a couple of drivers that are already doing this, Pure and Kaminario's
|
||||
K2, but with different configuration options,
|
||||
`pure_automatic_max_oversubscription_ratio` and
|
||||
`auto_calc_max_oversubscription_ratio` respectively, so we'll deprecate those
|
||||
configuration options and remove the code within those drivers when we add the
|
||||
generic code to Cinder.
|
||||
`auto_calc_max_oversubscription_ratio` respectively, so those configuration
|
||||
options will take precedence, if configured, over this new feature, but we'll
|
||||
encourage vendors to deprecate those options.
|
||||
|
||||
Drivers that are making use of the `max_over_subscription_ratio` in a non
|
||||
compatible way will raise an error and fail to start, logging an appropriate
|
||||
message if configured with this new feature.
|
||||
|
||||
|
||||
Provisioning calculations
|
||||
-------------------------
|
||||
@ -416,23 +419,26 @@ failures on creating volumes until we correct the values of
|
||||
`reserved_percentage` and `max_over_subscription_ratio` in our cloud to the
|
||||
right values, since we may have been using incorrect ones.
|
||||
|
||||
Two new configuration options will be added:
|
||||
A configuration option will be modified:
|
||||
|
||||
* `auto_max_over_subscription_ratio`: Boolean value that will instruct Cinder
|
||||
to automatically calculate the over subscription ratio based on current usage
|
||||
instead of using a fixed value.
|
||||
* `max_over_subscription_ratio`: Changes its type from Float to String and
|
||||
adds a new possible value, `auto`, that will enable this new feature.
|
||||
|
||||
A new configuration options will be added:
|
||||
|
||||
* `over_provisioning_calculation`: Will allow to select what kind of
|
||||
calculations the `CapacityFilter` does to determine if there is space for a
|
||||
volume in a backend. Acceptable values are `standard` and `cinder`. Default
|
||||
values will be `cinder`.
|
||||
|
||||
|
||||
Developer impact
|
||||
----------------
|
||||
|
||||
Driver maintainer will need to verify, and fix if necessary, their stat reports
|
||||
for `allocated_capacity_gb` and `provisioned_capacity_gb` unless they start
|
||||
using the new `auto_max_over_subscription_ratio` configuration option.
|
||||
for `allocated_capacity_gb` and `provisioned_capacity_gb` and if they are using
|
||||
`max_over_subscription_ratio` in a non compatible way they should fix their
|
||||
driver so that it supports the feature.
|
||||
|
||||
Implementation
|
||||
==============
|
||||
|
Loading…
x
Reference in New Issue
Block a user