summaryrefslogtreecommitdiff
path: root/nova/conf/scheduler.py
diff options
context:
space:
mode:
authorSean Mooney <work@seanmooney.info>2023-04-12 19:24:35 +0000
committerSean Mooney <work@seanmooney.info>2023-04-20 18:33:55 +0000
commite38d6a356b8238038f11565662eaacff2ec2c2df (patch)
tree30f576519e49c9f5f3ab43a36aad13431a95b2e7 /nova/conf/scheduler.py
parent01ffb6df85ad895bfe94cc46a3be958dbd266a7a (diff)
downloadnova-e38d6a356b8238038f11565662eaacff2ec2c2df.tar.gz
add hypervisor version weigher
implements: blueprint weigh-host-by-hypervisor-version Change-Id: I36b16a388383c26bdf432030bc9e28b2fd75d120
Diffstat (limited to 'nova/conf/scheduler.py')
-rw-r--r--nova/conf/scheduler.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/nova/conf/scheduler.py b/nova/conf/scheduler.py
index c75bd07c5b..c7aa2ad76d 100644
--- a/nova/conf/scheduler.py
+++ b/nova/conf/scheduler.py
@@ -464,6 +464,49 @@ Possible values:
* An integer or float value, where the value corresponds to the multipler
ratio for this weigher.
"""),
+ cfg.FloatOpt("hypervisor_version_weight_multiplier",
+ default=1.0,
+ help="""
+Hypervisor Version weight multiplier ratio.
+
+The multiplier is used for weighting hosts based on the reported
+hypervisor version.
+Negative numbers indicate preferring older hosts,
+the default is to prefer newer hosts to aid with upgrades.
+
+Possible values:
+
+* An integer or float value, where the value corresponds to the multiplier
+ ratio for this weigher.
+
+Example:
+
+* Strongly prefer older hosts
+
+ .. code-block:: ini
+
+ [filter_scheduler]
+ hypervisor_version_weight_multiplier=-1000
+
+
+* Moderately prefer new hosts
+
+ .. code-block:: ini
+
+ [filter_scheduler]
+ hypervisor_version_weight_multiplier=2.5
+
+* Disable weigher influence
+
+ .. code-block:: ini
+
+ [filter_scheduler]
+ hypervisor_version_weight_multiplier=0
+
+Related options:
+
+* ``[filter_scheduler] weight_classes``
+"""),
cfg.FloatOpt("io_ops_weight_multiplier",
default=-1.0,
help="""