Open datnt53 opened 6 years ago
To fix this issue you will need to change the variable extra_config['cpu_ratio']
to self.cpu_overcommit_ratio
We can see that a similar code is being called with correct variables;
ree = (int(self.cpu_overcommit_ratio * m_vcpus)) - m_vcpus_used cache_stats.append({ 'stat_name': 'free_vcpus', 'stat_value': free, 'host': host, })
So if we match that, and produce:
for agg in nova_aggregates.keys(): agg_hosts = nova_aggregates[agg]['hosts'] if host in agg_hosts: free = ((int(self.cpu_overcommit_ratio * m_vcpus)) - m_vcpus_used) nova_aggregates[agg]['metrics']['free_vcpus'] += free
We find that the code is working properly. I will be submitting a patch for this to att-comdev, but until then this is the fix.
Thank a lot!
2018-10-25 08:56:22,440:ERROR:'HypervisorStats' object has no attribute 'extra_config' 2018-10-25 08:56:22,441:ERROR:failed to get data for cache key hypervisor_stats
nova_aggregates[agg]['metrics']['free_vcpus'] += free