Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Add support for nova custom provider inventories
Browse files Browse the repository at this point in the history
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

Depends-On: If12d7f5a8c331e051eb543f88187c31e676f3b62
Depends-On: I509eec3bf37368640ae8a3df8271b769d29f70c4
Change-Id: I25ea828397fcc968d07b0d5e87bdc9445ac690e2
  • Loading branch information
stuggi committed Mar 1, 2021
1 parent cada48f commit f55a08a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
40 changes: 40 additions & 0 deletions deployment/nova/nova-compute-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -818,6 +856,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}
Expand Down Expand Up @@ -915,6 +954,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]}
Expand Down
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f55a08a

Please sign in to comment.