]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Sync scheduler module from oslo-incubator
authorJames Carey <jecarey@us.ibm.com>
Wed, 29 Jul 2015 22:55:03 +0000 (22:55 +0000)
committerJames Carey <jecarey@us.ibm.com>
Thu, 6 Aug 2015 04:29:11 +0000 (04:29 +0000)
commitbadedd29ea61d94d742ba71a3b0d54f3ab2cd0bd
tree9eefc607a57336582ce6242a698e844122fff9c0
parentd5b9f39046049d41ef10650a91d24e007715c9fe
Sync scheduler module from oslo-incubator

The scheduler and scheduler.weights modules have not been
updated since early in the Icehouse release cycle.  This
patch brings the version in Cinder up to date with what is in
oslo-incubator.

Current HEAD in OSLO:
---------------------
commit 20d7dc57819a70abdff967299542068946d75ac1
Date:   Wed Jul 29 03:49:46 2015 +0000
    Updated from global requirements

    Change-Id: Iba0e4f9545fc9ba82f080a0fec672761dcfeaeec

Patches included with sync by file:
---------------------
base_filter.py
 - 2fbf5065 - Remove oslo.log code and clean up versionutils API
 - 5d40e143 - Remove code that moved to oslo.i18n
 - 2af88ece - Use _LI instead of _ for info message translation
 - 4a47188e - Allow filters to only run once per request if their data is static
 - fcf517d7 - Update oslo log messages with translation domains
 - cae33101 - Stop looping all filters if no objects return
 base_handler.py
 - 6fa29aee - Trivial: Make vertical white space after license header consistent
 - 35660dac7 - Enable hacking H401 test
 - 5dcc43b1 - Break out common functionality for filters and weights
base_weight.py
 - 825cb870 - Upgrade to hacking 0.10
 - a2fa4878 - Fix common.scheduler.base_weight.BaseWeigher to be Python3 compat
 - e47bc70e - Normalize Scheduler Weights

 Note: Key changes were made that impact cinder:
   (1) The weigher base class changed the name of _weight_mulitipler() to
       weight_multiplier() which impacted cinder/scheduler/weights/capacity.py
       and cinder/scheduler/weights/volume_number.py.
   (2) Application of the weight multiplier was moved from the weigher to the
       handler and normalization of the weights prior to applying the weight
       multiplier was added.  This impacted cinder weigher test cases which
       were checking for non-normalized weights.
   (3) The normalization does not support the use of infinite weights which
       are used by the cinder capacity weigher.  When an infinite value is
       used, it is not known what the other weights will be, so this adds an
       override to CapacityWeigher for the weigh_objects() method that wraps
       the parent method to use the returned complete set of weights to
       replace any infinite weights with values that are much larger than
       the largest non-infinite weight.

Change-Id: Iad9bb431f0876e4957598c0ac0d3c8d7f67199fc
cinder/openstack/common/scheduler/base_filter.py
cinder/openstack/common/scheduler/base_handler.py
cinder/openstack/common/scheduler/base_weight.py
cinder/scheduler/weights/capacity.py
cinder/scheduler/weights/volume_number.py
cinder/tests/unit/scheduler/test_allocated_capacity_weigher.py
cinder/tests/unit/scheduler/test_capacity_weigher.py
cinder/tests/unit/scheduler/test_volume_number_weigher.py