Merge "Add support for nova custom provider inventories"

This commit is contained in:
Zuul 2021-03-16 19:31:06 +00:00 committed by Gerrit Code Review
commit 310844289a
2 changed files with 47 additions and 0 deletions

View File

@ -702,6 +702,44 @@ parameters:
default: ''
tags:
- role_specific
CustomProviderInventories:
description: |
Array of hashes describing the custom providers for the compute role.
Format:
name/uuid - Resource providers to target can be identified by either
UUID or name. In addition, the value $COMPUTE_NODE can be used in
the UUID field to identify all nodes managed by the service.
Exactly one of uuid or name is mandatory. If neither uuid or name
is provided, the special uuid $COMPUTE_NODE gets set in the template.
inventories - (Optional) Hash of custom provider inventories. 'total' is
a mandatory property. Any other optional properties not populated will
be given a default value by placement. If overriding a pre-existing
provider values will not be preserved from the existing inventory.
traits - (Optional) Array of additional traits.
Example:
ComputeParameters:
CustomProviderInventories:
- uuid: $COMPUTE_NODE
inventories:
CUSTOM_EXAMPLE_RESOURCE_CLASS:
total: 100
reserved: 0
min_unit: 1
max_unit: 10
step_size: 1
allocation_ratio: 1.0
CUSTOM_ANOTHER_EXAMPLE_RESOURCE_CLASS:
total: 100
traits:
- CUSTOM_P_STATE_ENABLED
- CUSTOM_C_STATE_ENABLED
type: json
default: {}
tags:
- role_specific
# DEPRECATED: the following options are deprecated and are currently maintained
# for backwards compatibility. They will be removed in future release.
@ -822,6 +860,7 @@ resources:
nova::compute::image_cache::remove_unused_base_images: NovaComputeImageCacheRemoveUnusedBaseImages
nova::compute::image_cache::remove_unused_resized_minimum_age_seconds: NovaComputeImageCacheRemoveUnusedResizedMinimumAge
nova::compute::image_cache::precache_concurrency: NovaComputeImageCachePrecacheConcurrency
nova::compute::provider::custom_inventories: CustomProviderInventories
- values: {get_param: [RoleParameters]}
- values:
NovaVcpuPinSet: {get_param: NovaVcpuPinSet}
@ -919,6 +958,7 @@ resources:
NovaComputeImageCacheRemoveUnusedBaseImages: {get_param: NovaComputeImageCacheRemoveUnusedBaseImages}
NovaComputeImageCacheRemoveUnusedResizedMinimumAge: {get_param: NovaComputeImageCacheRemoveUnusedResizedMinimumAge}
NovaComputeImageCachePrecacheConcurrency: {get_param: NovaComputeImageCachePrecacheConcurrency}
CustomProviderInventories: {get_param: CustomProviderInventories}
conditions:
enable_instance_ha: {equals: [{get_param: EnableInstanceHA}, true]}

View File

@ -0,0 +1,7 @@
---
features:
- |
Nova supports to configure resource provider inventory and traits using a
standardized YAML file format starting victoria release [1]. This introduces
CustomProviderInventories role parameter to configure the custom provider yaml.
[1] https://docs.openstack.org/nova/latest/admin/managing-resource-providers.html