Resource limit checks on a compute manager are based on the contents of
filter_properites[‘limits’]. This in turn is populated by the scheduler after the
host has been selected by scheduler.utils.populate_filter_properties. The limits
value is taken from the host_state, which is maintained as a local data in the
host manager. The host_state limits values are populated by the various filters,
for example the ram filter sets limits[‘memory_mb’] based on its configuration.
In the case of scheduling to a forced host the filters are bypassed, so the contents
of the host_state[‘limits’] value depends on whether the scheduler has already
placed a non-forced instance onto that host (and thus run the filters to populate
the limits). If it has then the compute manager will impose the limits, if it
hasn’t then the limits will be empty and there will be no check.
As forcing bypasses the filters and is a privileged operation the limits should
always be cleared in the filter_properties in this case
Fix proposed to branch: master /review. openstack. org/48666
Review: https:/