diff options
author | Sylvain Bauza <sbauza@redhat.com> | 2015-08-25 14:45:05 +0200 |
---|---|---|
committer | Sylvain Bauza <sbauza@redhat.com> | 2015-08-31 15:21:23 +0200 |
commit | 1c195210eb6eea1e6bfc77f8cef335c53b5d6b31 (patch) | |
tree | b969904d9834f14108c90c53f76bc93c90a682d3 /nova/scheduler/ironic_host_manager.py | |
parent | f4138f69cc88a576f188ce665b2ac699ae232ad3 (diff) | |
download | nova-1c195210eb6eea1e6bfc77f8cef335c53b5d6b31.tar.gz |
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
Diffstat (limited to 'nova/scheduler/ironic_host_manager.py')
-rw-r--r-- | nova/scheduler/ironic_host_manager.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |