From 0ecc8701990edc811b29284c5aae6adc19ee48ea Mon Sep 17 00:00:00 2001 From: Sylvain Bauza Date: Tue, 9 Feb 2016 15:53:19 +0100 Subject: [PATCH] Move Disk allocation ratio to ResourceTracker We already moved the CPU and RAM ratios to the compute nodes in Liberty but we forgot to add the disk one. Adding it now. That change specifically implies that nova.conf is consistent across the whole cloud since what was formerly defined on the scheduler side will have its definition by the compute nodes. Co-Authored-By: Sylvain Bauza UpgradeImpact Change-Id: Id4b44dc4c3391563154a30406a5f1e7a2dc015b3 Partially-Implements: blueprint disk-allocation-ratio-to-rt --- nova/compute/resource_tracker.py | 12 ++++++++++++ nova/conf/scheduler.py | 25 ------------------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/nova/compute/resource_tracker.py b/nova/compute/resource_tracker.py index 87d36fe06d..f7f78937cf 100644 --- a/nova/compute/resource_tracker.py +++ b/nova/compute/resource_tracker.py @@ -81,6 +81,18 @@ allocation_ratio_opts = [ 'NOTE: This can be set per-compute, or if set to 0.0, the value ' 'set on the scheduler node(s) will be used ' 'and defaulted to 1.5'), + cfg.FloatOpt('disk_allocation_ratio', + default=1.0, + help='This is the virtual disk to physical disk allocation ratio used ' + 'by the disk_filter.py script to determine if a host has ' + 'sufficient disk space to fit a requested instance. A ratio ' + 'greater than 1.0 will result in over-subscription of the ' + 'available physical disk, which can be useful for more ' + 'efficiently packing instances created with images that do not ' + 'use the entire virtual disk,such as sparse or compressed ' + 'images. It can be set to a value between 0.0 and 1.0 in order ' + 'to preserve a percentage of the disk for uses other than ' + 'instances'), ] diff --git a/nova/conf/scheduler.py b/nova/conf/scheduler.py index cc8b98d1bc..7c222668f2 100644 --- a/nova/conf/scheduler.py +++ b/nova/conf/scheduler.py @@ -322,30 +322,6 @@ be sure to test this with your selected scheduler. ``nova-service service_down_time`` """) -disk_allocation_ratio_opt = cfg.FloatOpt("disk_allocation_ratio", - default=1.0, - help=""" -This is the virtual disk to physical disk allocation ratio used by the -disk_filter.py script to determine if a host has sufficient disk space to fit a -requested instance. A ratio greater than 1.0 will result in over-subscription -of the available physical disk, which can be useful for more efficiently -packing instances created with images that don't use the entire virtual disk, -such as sparse or compressed images. It can be set to a value between 0.0 and -1.0 in order to preserve a percentage of the disk for uses other than -instances. - -This option is only used by the FilterScheduler and its subclasses; if you use -a different scheduler, this option has no effect. - -* Services that use this: - - ``nova-scheduler`` - -* Related options: - - None -""") - isolated_img_opt = cfg.ListOpt("isolated_images", default=[], help=""" @@ -723,7 +699,6 @@ default_opts = [host_subset_size_opt, driver_opt, driver_period_opt, scheduler_json_config_location_opt, - disk_allocation_ratio_opt, isolated_img_opt, isolated_host_opt, restrict_iso_host_img_opt,