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

Commit

Permalink
Merge "Add support for nova custom provider inventories"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Mar 16, 2021
2 parents 5ae932b + f55a08a commit 3108442
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 @@ -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}
Expand Down Expand Up @@ -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]}
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 3108442

Please sign in to comment.