From 39cb050371cee10a48638bd68e3289bae712569a Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 16 Sep 2022 11:32:10 +0900 Subject: [PATCH] Add support for [quota] count_usage_from_placement This change adds support for the [quota] count_usage_from_placement option in nova.conf, which allows nova to count core/ram usage from placement. Change-Id: I1668efd5f9fe2509e0fcfdd431dd74c304e3d0bd --- manifests/quota.pp | 6 ++++++ .../notes/count_usage_from_placement-0dfdb5b464d68f63.yaml | 5 +++++ spec/classes/nova_quota_spec.rb | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/count_usage_from_placement-0dfdb5b464d68f63.yaml diff --git a/manifests/quota.pp b/manifests/quota.pp index bf48c85d5..aee915a83 100644 --- a/manifests/quota.pp +++ b/manifests/quota.pp @@ -53,6 +53,10 @@ # quota to be exceeded. # Defaults to $::os_service_default # +# [*count_usage_from_placement*] +# (optional Enable the counting of quota usage from the placement service. +# Defaults to $::os_service_default +# class nova::quota( $driver = $::os_service_default, $instances = $::os_service_default, @@ -66,6 +70,7 @@ class nova::quota( $server_groups = $::os_service_default, $server_group_members = $::os_service_default, $recheck_quota = $::os_service_default, + $count_usage_from_placement = $::os_service_default, ) { include nova::deps @@ -83,5 +88,6 @@ class nova::quota( 'quota/server_groups': value => $server_groups; 'quota/server_group_members': value => $server_group_members; 'quota/recheck_quota': value => $recheck_quota; + 'quota/count_usage_from_placement': value => $count_usage_from_placement; } } diff --git a/releasenotes/notes/count_usage_from_placement-0dfdb5b464d68f63.yaml b/releasenotes/notes/count_usage_from_placement-0dfdb5b464d68f63.yaml new file mode 100644 index 000000000..c0a3a1324 --- /dev/null +++ b/releasenotes/notes/count_usage_from_placement-0dfdb5b464d68f63.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``nova::quota::count_usage_from_placement`` parameter has been + added. diff --git a/spec/classes/nova_quota_spec.rb b/spec/classes/nova_quota_spec.rb index f73cac61e..c87e7ae2a 100644 --- a/spec/classes/nova_quota_spec.rb +++ b/spec/classes/nova_quota_spec.rb @@ -18,6 +18,7 @@ describe 'nova::quota' do :server_groups => '', :server_group_members => '', :recheck_quota => '', + :count_usage_from_placement => '', } end @@ -52,6 +53,7 @@ describe 'nova::quota' do :server_groups => 20, :server_group_members => 20, :recheck_quota => true, + :count_usage_from_placement => false, }) end