Greeting,
In compute/manager.py, there is a periodic task named as
update_available_resource(), it will update resource for each compute
periodically.
@periodic_task.periodic_task
def update_available_resource(self, context):
"""See driver.get_available_resource()
Periodic process that keeps that the compute host's understanding of
resource availability and usage in sync with the underlying
hypervisor.
:param context: security context
"""
new_resource_tracker_dict = {}
nodenames = set(self.driver.get_available_nodes())
for nodename in nodenames:
rt = self._get_resource_tracker(nodename)
rt.update_available_resource(context) <<<<<<<<<< Update here
new_resource_tracker_dict[nodename] = rt
In resource_tracker.py,
https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L384
self._update(context, resources, prune_stats=True)
It always set prune_stats as True, this caused some problems for me. As now
I'm putting some metrics to compute_node_stats table, those metrics does
not change frequently, so I did not update it frequently. But the periodic
task always prune the new metrics that I added.
What about add a configuration parameter in nova.cont to make prune_stats
as configurable?
Thanks,
Jay
_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev