Resource tracker causes update of compute_nodes table every minute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Resource tracker in nova-compute checks the resource usage every minute.
If the latest resource usage is different from the previous of that,
nova-compute request nova-scheduler to update compute_nodes table in DB.
https:/
_update() calls _resource_change(). And in _resource_change(), resource usages are compared by obj_equal_prims().
In obj_equal_prims(), the resource usage lists are created.
https:/
And I found that the lists contained "updated_at" in their keys.
prim_1 ={'nova_
'nova_object.name': 'ComputeNode',
'nova_object.data': {'pci_device_
'nova_object.name': 'PciDevicePoolL
'nova_object.data': {'objects': []}, 'nova_object.
'updated_at': '2017-01-
(omission)
prim_2 ={'nova_
'nova_object.name': 'ComputeNode',
'nova_object.data': {'pci_device_
'nova_object.name': 'PciDevicePoolL
'nova_object.data': {'objects': []}, 'nova_object.
'updated_at': '2017-01-
(omission)
These difference in "updated_at" values makes unequal resource usage in recent 2 times checks,
and causes update of compute_nodes table every minute.
I noticed this problem in Mitaka. According to the code, I think this happens in master.
Changed in nova: | |
assignee: | Chris Dent (cdent) → Dan Smith (danms) |
I can confirm that this does indeed appear to be the case in master (as of 20170123): The compute_node in a single node devstack is updated every 61 seconds.