<div dir="ltr"><div><div>Greeting,<br><br>In compute/manager.py, there is a periodic task named as update_available_resource(), it will update resource for each compute periodically.<br><br> @periodic_task.periodic_task<br>
def update_available_resource(self, context):<br> """See driver.get_available_resource()<br><br> Periodic process that keeps that the compute host's understanding of<br> resource availability and usage in sync with the underlying hypervisor.<br>
<br> :param context: security context<br> """<br> new_resource_tracker_dict = {}<br> nodenames = set(self.driver.get_available_nodes())<br> for nodename in nodenames:<br> rt = self._get_resource_tracker(nodename)<br>
rt.update_available_resource(context) <<<<<<<<<< Update here<br> new_resource_tracker_dict[nodename] = rt<br><br>In resource_tracker.py, <a href="https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L384">https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L384</a><br>
<br>self._update(context, resources, prune_stats=True)<br><br>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.<br>
<br></div>What about add a configuration parameter in nova.cont to make prune_stats as configurable?<br><br>Thanks,<br><br></div>Jay<br><div><div><br><br><br><br></div></div></div>