The solution of the bug is extremly simple.
In nova/scheduler/filter_scheduler.py,
weighed_hosts = self.host_manager.get_weighed_hosts(filtered_hosts, spec_obj)
# Strip off the WeighedHost wrapper class... weighed_hosts = [h.obj for h in weighed_hosts]
The solution of the bug is extremly simple. filter_ scheduler. py,
In nova/scheduler/
# Strip off the WeighedHost wrapper class...
Exchange the last two lines of code, make sure logging the weighed_hosts before we strip off the WeighedHost wrapper class.
Then, the log become to this: filter_ scheduler [req-26963753- 81af-4742- a0cd-b8279bb490 5a 8fdccd78f9404cc bb427b0b798f46f 67 d8706f56f2314bb b8e62463ba833bb 1e - default default] Weighed [WeighedHost [host: (Shelf1Slot3SBCR, Shelf1Slot3SBCR) ram: 12743MB disk: 112640MB io_ops: 0 instances: 0, weight: 1.71508529652], WeighedHost [host: (nail2, nail2) ram: 19919MB disk: 120832MB io_ops: 0 instances: 0, weight: 1.63476368028], WeighedHost [host: (nail1, nail1) ram: 27527MB disk: 226304MB io_ops: 0 instances: 2, weight: -999997.0]] _get_sorted_hosts /usr/lib/ python2. 7/site- packages/ nova/scheduler/ filter_ scheduler. py:453
2019-02-18 15:08:50.710 19828 DEBUG nova.scheduler.