214b7550bc
The database query service_get_all_by_binary should return a list of services with the specified binary but it currently excludes disabled hosts. This change adds a name parameter called 'include_disabled' which provides the caller with the option of having disabled hosts returned too. This query is used by the scheduler to retrieve the list of available hosts. The initial list should include disabled hosts. The ComputeFilter removes disabled hosts so inclusion of this filter is the proper way to exclude disabled hosts. Excluding disabled hosts from the initial list prevents the forcehost feature from being used to place an instance on a disabled host. The query is only used in objects.ServiceList.get_by_binary which is only called in one other place, in cells/state.py by CellStateManager._get_compute_hosts. Adding the named parameter to the get_by_binary method of the ServiceList class means the behaviour of CellStateManager._get_compute_hosts will not be impacted. Change-Id: I05c2716da45119e6e6aa272b0701be9ae098842c Closes-Bug: #1553099
7 lines
219 B
YAML
7 lines
219 B
YAML
---
|
|
upgrade:
|
|
- The FilterScheduler is now including disabled hosts.
|
|
Make sure you include the ComputeFilter in the
|
|
``scheduler_default_filters`` config option to avoid
|
|
placing instances on disabled hosts.
|