From 1c195210eb6eea1e6bfc77f8cef335c53b5d6b31 Mon Sep 17 00:00:00 2001 From: Sylvain Bauza Date: Tue, 25 Aug 2015 14:45:05 +0200 Subject: Update HostManager and filters to use ComputeNode ratios Since the ComputeNode object provides a compatible facade for the Scheduler, we can get it from the HostManager and provide those fields up to the filters. As the HostManager is calling ComputeNodeList.get_all(), then the related HostStates will all have the scheduler nova.conf allocation ratios. Change-Id: I3bd28cd2069ada2f9b0d1fd9c05d12bb6f8f75d9 Partially-Implements: blueprint allocation-ratio-to-resource-tracker --- nova/scheduler/ironic_host_manager.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nova/scheduler/ironic_host_manager.py') diff --git a/nova/scheduler/ironic_host_manager.py b/nova/scheduler/ironic_host_manager.py index 3fde40cd6e..4b291908e6 100644 --- a/nova/scheduler/ironic_host_manager.py +++ b/nova/scheduler/ironic_host_manager.py @@ -81,6 +81,11 @@ class IronicNodeState(host_manager.HostState): in compute.supported_hv_specs] else: self.supported_instances = [] + + # update allocation ratios given by the ComputeNode object + self.cpu_allocation_ratio = compute.cpu_allocation_ratio + self.ram_allocation_ratio = compute.ram_allocation_ratio + self.updated = compute.updated_at @host_manager.set_update_time_on_success -- cgit v1.2.1