nova-scheduler did not logged the weight of each compute_node
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
Pike |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Queens |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Rocky |
Fix Committed
|
Medium
|
Matt Riedemann |
Bug Description
Description
===========
nova-scheduler did not logged the weight of each compute_node, even if we configured "debug=true".
You can only see this in nova-scheduler.log (Rocky version).
2019-02-18 15:02:56.918 18716 DEBUG nova.scheduler.
But in kilo OpenStack, we can see:
2019-02-18 15:31:07.418 24797 DEBUG nova.scheduler.
Obviously, we have lost the weight value for each compute_nodes now.
Environment
===========
[root@nail1 ~]# rpm -qi openstack-nova-api
Name : openstack-nova-api
Epoch : 1
Version : 18.0.2
Release : 1.el7
Architecture: noarch
Install Date: Wed 17 Oct 2018 02:23:03 PM CST
Group : Unspecified
Size : 5595
License : ASL 2.0
Signature : RSA/SHA1, Mon 15 Oct 2018 05:02:18 PM CST, Key ID f9b9fee7764429e6
Source RPM : openstack-
Build Date : Tue 09 Oct 2018 05:54:47 PM CST
Build Host : p8le01.
Relocations : (not relocatable)
Packager : CBS <email address hidden>
Vendor : CentOS
URL : http://
Summary : OpenStack Nova API services
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.