charm-nova-compute/hooks
Brett Milford 43acdd4f80 Added allocation-ratio config opts
Nova supports setting allocation ratios at the nova-compute level from
Liberty onwards. Prior to this allocation ratios were set at the
nova-scheduler level.

Newton introduced the Placement API, and Ocata introduced the ability to
have compute resources (Core/RAM/Disk) precomputed before passing
candidates to the FilterScheduler [0]. Pike removed CoreFilter,
RAMFilter and DiskFilter scheduler filters.

From Pike onwards valid methods for settings these allocation ratios are via:
- A call to the Placement API [1].
- Config values to supplied to nova-compute (xxx_allocation_ratio).

Stein introduced initial_xxx_allocation_ratio in response to the runtime
behaviour of the ResourceTracker [2].

Currently, the precedence of resource ratio values are:
xxx_allocation_ratio > Placement API call > initial_xxx_allocation_ratio

That is a (compute) resource provider's allocation ratios will default
to initial_xxx_allocation_ratio which may be overridden at run time by a
call to the Placement API. If xxx_allocation_ratio is set it will
override all configurations for that provider.

When not otherwise configured, we set initial_xxx_allocation_ratio to
the values provided by ncc to maintain backwards compatibility. Where
initial_xxx_allocation_ratio is not available we set
xxx_allocation_ratio.

[0] https://specs.openstack.org/openstack/nova-specs/specs/ocata/implemented/resource-providers-scheduler-db-filters.html
[1] https://docs.openstack.org/api-ref/placement/#update-resource-provider-inventories
[2] https://specs.openstack.org/openstack/nova-specs/specs/stein/implemented/initial-allocation-ratios.html

Change-Id: Ifa314e9e23e0ae5d16113cd91a7507e61f9de704
Closes-Bug: #1677223
2021-05-24 15:39:47 +10:00
..
charmhelpers CH Sync to pick up fixes to bug/1923739 2021-04-15 13:00:02 +00:00
__init__.py Re-license charm as Apache-2.0 2016-07-03 16:37:37 +00:00
amqp-relation-broken Add generic relation broken hook. 2013-08-20 12:10:36 -07:00
amqp-relation-changed Update symlinks. 2013-08-01 16:34:15 -07:00
amqp-relation-departed added amqp relation departed 2014-01-30 12:46:46 +01:00
amqp-relation-joined Update symlinks. 2013-08-01 16:34:15 -07:00
ceph-access-relation-changed Fix support for cinder ceph rbd in Ocata 2017-03-09 12:51:25 +00:00
ceph-access-relation-joined Add LXD support for ceph-access relation 2017-04-27 09:40:01 +01:00
ceph-relation-broken Add generic relation broken hook. 2013-08-20 12:10:36 -07:00
ceph-relation-changed Update symlinks. 2013-08-01 16:34:15 -07:00
ceph-relation-joined Update symlinks. 2013-08-01 16:34:15 -07:00
cloud-compute-relation-changed Update symlinks. 2013-08-01 16:34:15 -07:00
cloud-compute-relation-joined Update symlinks. 2013-08-01 16:34:15 -07:00
cloud-credentials-relation-changed Retrieve cloud credentials directly from keystone 2018-06-18 08:29:28 +00:00
cloud-credentials-relation-joined Retrieve cloud credentials directly from keystone 2018-06-18 08:29:28 +00:00
compute-peer-relation-joined [bradm] initial nrpe checks 2014-10-29 22:30:36 -05:00
config-changed Update symlinks. 2013-08-01 16:34:15 -07:00
ephemeral-backend-relation-broken Add ability to provide another ephemeral storage for nova-compute 2016-06-17 23:44:45 +03:00
ephemeral-backend-relation-changed Add ability to provide another ephemeral storage for nova-compute 2016-06-17 23:44:45 +03:00
ephemeral-device-storage-attached Add support for instance storage encryption 2018-05-15 08:27:10 +01:00
ephemeral-device-storage-detached Add support for instance storage encryption 2018-05-15 08:27:10 +01:00
image-service-relation-broken Add generic relation broken hook. 2013-08-20 12:10:36 -07:00
image-service-relation-changed Update symlinks. 2013-08-01 16:34:15 -07:00
install Update pre-install hooks to fail on error 2019-02-08 15:56:19 -06:00
install.real Ensure python2 is installed before hook execution 2015-09-22 14:53:11 +01:00
ironic-api-relation-changed Add Ironic virt type 2020-09-21 12:12:13 +00:00
lxd-relation-changed Ensure all settings provided on lxd relation before configuring 2015-09-22 15:22:50 +01:00
lxd-relation-joined Add missing hook 2015-07-23 22:30:01 -04:00
neutron-plugin-relation-changed [bradm] initial nrpe checks 2014-10-29 22:30:36 -05:00
neutron-plugin-relation-departed [bradm] initial nrpe checks 2014-10-29 22:30:36 -05:00
neutron-plugin-relation-joined [bradm] initial nrpe checks 2014-10-29 22:30:36 -05:00
nova-ceilometer-relation-changed Add new locally scoped relation and context updates for nova-ceilometer 2013-11-29 15:35:28 +00:00
nova-ceilometer-relation-joined Add new locally scoped relation and context updates for nova-ceilometer 2013-11-29 15:35:28 +00:00
nova_compute_context.py Added allocation-ratio config opts 2021-05-24 15:39:47 +10:00
nova_compute_hooks.py Use get_availability_zone() on cloud-compute relation 2021-04-21 20:48:46 -07:00
nova_compute_utils.py Added allocation-ratio config opts 2021-05-24 15:39:47 +10:00
nrpe-external-master-relation-changed [bradm] initial nrpe checks 2014-10-29 22:30:36 -05:00
nrpe-external-master-relation-joined Update of all Havana / Saucy / python-redux work: 2013-10-15 13:04:13 +01:00
post-series-upgrade Series Upgrade 2018-09-18 10:01:56 +00:00
pre-series-upgrade Series Upgrade 2018-09-18 10:01:56 +00:00
secrets-storage-relation-broken Add support for instance storage encryption 2018-05-15 08:27:10 +01:00
secrets-storage-relation-changed Add support for instance storage encryption 2018-05-15 08:27:10 +01:00
secrets-storage-relation-departed Add support for instance storage encryption 2018-05-15 08:27:10 +01:00
secrets-storage-relation-joined Add support for instance storage encryption 2018-05-15 08:27:10 +01:00
shared-db-relation-broken Add generic relation broken hook. 2013-08-20 12:10:36 -07:00
shared-db-relation-changed Update symlinks. 2013-08-01 16:34:15 -07:00
shared-db-relation-joined Update symlinks. 2013-08-01 16:34:15 -07:00
start [bradm] initial nrpe checks 2014-10-29 22:30:36 -05:00
stop [bradm] initial nrpe checks 2014-10-29 22:30:36 -05:00
storage.bootstrap Add support for instance storage encryption 2018-05-15 08:27:10 +01:00
storage.real Add support for instance storage encryption 2018-05-15 08:27:10 +01:00
update-status Refactor to assess status after every hook execution, add update-status hook 2015-10-07 16:48:03 -07:00
upgrade-charm Ensure that all packaged python deps are installed on upgrade 2019-11-29 15:25:26 +00:00
upgrade-charm.real Ensure that all packaged python deps are installed on upgrade 2019-11-29 15:25:26 +00:00