Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1041497 - [RFE][cinder]: Incorpate driver supplied filtering and weighing functions to be part of placement decision making
[RFE][cinder]: Incorpate driver supplied filtering and weighing functions to ...
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity medium
: Upstream M2
: 7.0 (Kilo)
Assigned To: Eric Harney
nlevinki
https://blueprints.launchpad.net/cind...
upstream_milestone_kilo-2 upstream_st...
: FutureFeature, OtherQA, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-12 11:39 EST by RHOS Integration
Modified: 2016-04-26 09:27 EDT (History)
5 users (show)

See Also:
Fixed In Version: openstack-cinder-2015.1.0-2.el7ost
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-05 09:10:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:1548 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2015-08-05 13:07:06 EDT

  None (edit)
Description RHOS Integration 2013-12-12 11:39:18 EST
Cloned from launchpad blueprint https://blueprints.launchpad.net/cinder/+spec/filtering-weighing-with-driver-supplied-functions.

Description:

We have been using filter scheduler since Grizzly.  While the default filters and weigher certainly do the job and help scheduler make good decision and rule out unqualified back-ends, there are also some situation when some filters/weighers become useless.  For example, due to thin-provisioning or other advanced data manipulating mechanisms back-ends may have, the 'free capacity' becomes less useful we thought it would be. 

What's more, different backends have different metrics that are actually useful for them, and only the manufacturer really knows what these are, which makes it hard or almost impossible to create a global filter for these kind of metrics.
 
For example, a foomatic super array might have an absolute maximum capacity of 1000 volumes, and might get some performance degredation if more than 75% of total space is actually used. Also it has a max volume size of 500 gig. This sort of detail is likely to be highly variable between vendors, and even between different arrays of from the same vendor.

During HongKong design summit sessions, some idea came up from RedHat engineer.  He mentioned that Cinder could allow each backend to return two new functions when reporting capabilities/status, and those will be used for filtering and weighing.  

    FILTER FUNCTION and GOODNESS FUNCTION, together with any values needed by these functions.
    FILTER FUNCTION is a function that evaluates to True or False, and must evaluate to True for a specific volume in order for that backend to be considered a candidate for this volume.
    GOODNESS FUNCTION is a function that evaluates to a value from one to one hundred, indicating how much of a good fit this backend thinks it is for a specific volume. 100 means 'I'm ideal' 50 means 'if nobody better is about' and 10 'really only as a last resort'.  (Better guidance on these values can be provided)
    In both cases, the function has access to details of the volume, the type, and the last reported stats from the array, e.g. volume.size type.min_iops stats.capacity
To give a concrete example for our foomatic super array, it might return:
    {
        "Backend name": "Foomatic super-array 2000";
        "Filter funtion": "(stats.n_vols < 1000) AND (stats.free_space <= volume.size) AND (volume.size <= 500)";
        "Goodness function": "(stats.percent_capacity_used < 75 ? 50 + (stats.percent_capacity_used / 2) : (stats.percent_capacity_used / 2))";
        "percent_capacity_used": 25;
        "free_space": 2575;
        "n_vols": 217;
        ...
    }

The exact operations supported by the function can be decided by the implementer, but a good start would be <, >, =, <=, >=, min(X,Y,...), max(X,Y,...), +, -, *, /, (X?Y:Z), abs()

With that, scheduler is able to share some internal wisdom of each back-ends to deal with vendor specific metrics or common metrics that vendors tend to interpret differently.  Meanwhile, scheduler also have filters and weighers that does global filtering/weighing.  So schedulers takes two set of filters and weighers to make optimal placement decisions. 

The workflow will be:
 1) back-end drivers periodically reports status and functions to scheduler;
 2) scheduler updates its cache for status and functions;
 3) when new request comes, scheduler filters back-ends using filter-chain like this:

  INPUT (back-end status) ->  [BACK-END_SPECIFIC_FILTER, Global_Filters(availability_zone_filter, retry_filter, json_filter, etc)]
                                                     |
                                                    v
            [BACK-END_SPECIFIC_WEIGHTER, Global_Weigher]  ->   Normalized Weights for candidates -> Winner takes the job



Specification URL (additional information):

https://etherpad.openstack.org/p/cinder-driver-goodness-reporting
Comment 7 Yogev Rabl 2015-07-15 09:45:18 EDT
verified in 
python-cinder-2015.1.0-3.el7ost.noarch
openstack-cinder-2015.1.0-3.el7ost.noarch
python-cinderclient-1.2.1-1.el7ost.noarch
Comment 9 errata-xmlrpc 2015-08-05 09:10:49 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2015:1548

Note You need to log in before you can comment on or make changes to this bug.