summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorSean Dague <sdague@linux.vnet.ibm.com>2012-07-24 14:14:48 -0400
committerSean Dague <sdague@linux.vnet.ibm.com>2012-07-24 15:59:52 -0400
commitc3ff5c5e932509a56bddab625513dc1663b0f1df (patch)
treeabc8b73b7bd126c7219bf4ee6e9bc408f6f96107 /nova
parent013ab2fdfc2c8a0c74ecf3c2287fb6a36d8b6728 (diff)
downloadnova-c3ff5c5e932509a56bddab625513dc1663b0f1df.tar.gz
nova-c3ff5c5e932509a56bddab625513dc1663b0f1df.tar.xz
nova-c3ff5c5e932509a56bddab625513dc1663b0f1df.zip
update compute_fill_first_cost_fn docstring
The default value for weight of the compute_fill_first_cost_fn is actually -1.0, which means it does exactly the opposite of what the function docstring says it does. Update the docstring to warn people of this fact. Issue reported via bug #1023827 which was closed as won't fix but the docs should be clearer. Updated based on feedback. Change-Id: I56acde254c932a8e66f941aaeb7304665500610f
Diffstat (limited to 'nova')
-rw-r--r--nova/scheduler/least_cost.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/nova/scheduler/least_cost.py b/nova/scheduler/least_cost.py
index 71db730cb..bccdd0a4f 100644
--- a/nova/scheduler/least_cost.py
+++ b/nova/scheduler/least_cost.py
@@ -79,8 +79,13 @@ def noop_cost_fn(host_state, weighing_properties):
def compute_fill_first_cost_fn(host_state, weighing_properties):
- """More free ram = higher weight. So servers will less free
- ram will be preferred."""
+ """More free ram = higher weight. So servers with less free
+ ram will be preferred.
+
+ Note: the weight for this function in default configuration
+ is -1.0. With a -1.0 this function runs in reverse, so systems
+ with the most free memory will be preferred.
+ """
return host_state.free_ram_mb