4 Commits

Author SHA1 Message Date
Matt Riedemann
945e7cb2a4 Fix typo in initial_disk_allocation_ratio release note
Change-Id: Ib8becc39ce76847652d3538c3334cc3514ba7a33
Closes-Bug: #1816831
2019-02-20 14:35:01 -05:00
Yikun Jiang
3562a6a957 Add compute_node ratio online data migration script
This patch adds an online data migration script to process the
ratio with 0.0 or None value.

If it's an existing record with 0.0 values, we'd want to do what
the compute does, which is use the configure ``xxx_allocation_ratio``
config if it's not None, and fallback to using the
``initial_xxx_allocation_ratio`` otherwise.

Change-Id: I3a6d4d3012b3fffe94f15a724dd78707966bb522
blueprint: initial-allocation-ratios
2018-12-05 11:36:23 -05:00
Yikun Jiang
08f3ae9606 Use new `initial_xxx_allocation_ratio` CONF
This patch adds new ``initial_xxx_allocation_ratio`` CONF options
and modifies the resource tracker's initial compute node creation to
use these values.

During the update_available_resource periodic task, the allocation
ratios reported to inventory for VCPU, MEMORY_MB and DISK_GB will
be based on:

* If CONF.*_allocation_ratio is set, use it. This overrides everything
  including externally set allocation ratios via the placement API.
* If reporting inventory for the first time, the
  CONF.initial_*_allocation_ratio value is used.
* For everything else, the inventory reported remains unchanged which
  allows operators to set the allocation ratios on the inventory records
  in placement directly without worrying about nova-compute overwriting
  those changes.

As a result, several TODOs are removed from the virt drivers that
implement the update_provider_tree interface and a TODO in the resource
tracker about unset-ing allocation ratios to get back to initial values.

Change-Id: I14a310b20bd9892e7b34464e6baad49bf5928ece
blueprint: initial-allocation-ratios
2018-11-30 15:32:06 -05:00
Yikun Jiang
212eff600a Change the default values of XXX_allocation_ratio
This patch including 2 changes:
1. Change the default values for
CONF.(cpu|ram|disk)_allocation_ratio to ``None``

2. Change the resource tracker to overwrite the compute node's
allocations ratios to the value of the XXX_allocation_ratio if
the value of these options is NOT ``None`` or ``0.0``.

The "0.0" condition is for upgrade impact, and it will be
removed in the next version (T version).

Change-Id: I6893d63dc5f29bc2eb348fe0aa9fbc8490e6eb40
blueprint: initial-allocation-ratios
2018-11-28 16:30:14 +08:00