yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #60738
[Bug 1658629] [NEW] Resource tracker causes update of compute_nodes table every minute
Public bug reported:
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://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L712-L728
_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://github.com/openstack/nova/blob/master/nova/objects/base.py#L328-L360
And I found that the lists contained "updated_at" in their keys.
prim_1 ={'nova_object.version': u'1.16',
'nova_object.name': 'ComputeNode',
'nova_object.data': {'pci_device_pools': {'nova_object.version': '1.1',
'nova_object.name': 'PciDevicePoolList',
'nova_object.data': {'objects': []}, 'nova_object.namespace': 'nova'},
'updated_at': '2017-01-20T01:07:43Z', ★here
(omission)
prim_2 ={'nova_object.version': '1.16',
'nova_object.name': 'ComputeNode',
'nova_object.data': {'pci_device_pools': {'nova_object.version': '1.1',
'nova_object.name': 'PciDevicePoolList',
'nova_object.data': {'objects': []}, 'nova_object.namespace': 'nova'},
'updated_at': '2017-01-20T01:06:42Z', ★here
(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.
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1658629
Title:
Resource tracker causes update of compute_nodes table every minute
Status in OpenStack Compute (nova):
New
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://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L712-L728
_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://github.com/openstack/nova/blob/master/nova/objects/base.py#L328-L360
And I found that the lists contained "updated_at" in their keys.
prim_1 ={'nova_object.version': u'1.16',
'nova_object.name': 'ComputeNode',
'nova_object.data': {'pci_device_pools': {'nova_object.version': '1.1',
'nova_object.name': 'PciDevicePoolList',
'nova_object.data': {'objects': []}, 'nova_object.namespace': 'nova'},
'updated_at': '2017-01-20T01:07:43Z', ★here
(omission)
prim_2 ={'nova_object.version': '1.16',
'nova_object.name': 'ComputeNode',
'nova_object.data': {'pci_device_pools': {'nova_object.version': '1.1',
'nova_object.name': 'PciDevicePoolList',
'nova_object.data': {'objects': []}, 'nova_object.namespace': 'nova'},
'updated_at': '2017-01-20T01:06:42Z', ★here
(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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1658629/+subscriptions