summaryrefslogtreecommitdiffstats
path: root/bin/stack
diff options
context:
space:
mode:
authorChris Behrens <cbehrens@codestud.com>2012-01-15 21:46:21 -0800
committerChris Behrens <cbehrens@codestud.com>2012-01-18 05:43:36 +0000
commitd328ddcadb24d1b1961bd05a7676bc8f54b6776f (patch)
treed68bb15f3134cee935c33b6578a93e1eb549a04e /bin/stack
parentad8843740154ebfa1e1be90413b9c5e973af9849 (diff)
downloadnova-d328ddcadb24d1b1961bd05a7676bc8f54b6776f.tar.gz
nova-d328ddcadb24d1b1961bd05a7676bc8f54b6776f.tar.xz
nova-d328ddcadb24d1b1961bd05a7676bc8f54b6776f.zip
Separate scheduler host management
This is a bit of a scheduler refactoring to support future scaling work as a part of blueprint scaling-zones. Also fixes bug 891971 (remove unused set_network_host in scheduler) With or without that blueprint work, this cleans a number of things up and paves the way for combining a lot of the schedulers by using this new 'HostManager' for filtering and weighing (future work :) On to the goodies: Introduces new HostManager, splitting code out from ZoneManager. Zone communication and management is handlded in the ZoneManager. Host filtering and weighing is handled in the HostManager. ZoneManager is removed from the SchedulerManager and direct calls to it from the SchedulerManager now occur via the scheduler driver. This simplifies a number of things. ZoneManager and HostManager classes to use are now flags. This allows one to extend the current classes and use them. HostManager uses a HostState class to keep info about hosts. This class needs to be extendable. Since it's very much tied to the HostManager, the HostState class to use is not a flag. It is, instead, a class variable in HostManager. Filtering functions now accept a single host to filter. This improves performance by not having to build a new array of hosts within every filter function. Filtering functions now accept a more generic 'filter_properties' dictionary which we can fill with information available for filtering. Adding additional data to this 'filter_properties' can be done by subclassing. Weighing functions now accept this 'filter_properties', also, although it's poorly named ATM. Will be cleaned up in a future branch when I move some weighing functions into the host manager. Filtering tests are true unit tests now. test_zones was moved from top level to under scheduler as zone_manager tests and refactored to be true unit tests. Host tests are true unit tests now. Other minor cleanups Change-Id: I0ef2acef6639b4500c400c18cf2c673cb80f0150
Diffstat (limited to 'bin/stack')
0 files changed, 0 insertions, 0 deletions