Add new dynamic vendordata option, vendordata_dynamic_failure_fatal

This option was added to nova during the Ocata cycle and allows a
request to fail if a dynamic vendordata provider cannot be contacted
or the request times out (connect or read).

Change-Id: I43e7b880273bb5a0a63d39a7ebd79b78695c52a1
This commit is contained in:
Rob Crittenden 2017-03-01 15:36:39 +00:00 committed by Juan Antonio Osorio Robles
parent 334eec2fd0
commit c622f1e098
3 changed files with 15 additions and 0 deletions

View File

@ -164,6 +164,11 @@
# once connected.
# Defaults to $::os_service_default
#
# [*vendordata_dynamic_failure_fatal*]
# (optional) Should failures to fetch dynamic vendordata be fatal to
# instance boot?
# Defaults to $::os_service_default
#
# [*max_limit*]
# (optional) This option is limit the maximum number of items in a single response.
# Defaults to $::os_service_default
@ -270,6 +275,7 @@ class nova::api(
$vendordata_dynamic_targets = $::os_service_default,
$vendordata_dynamic_connect_timeout = $::os_service_default,
$vendordata_dynamic_read_timeout = $::os_service_default,
$vendordata_dynamic_failure_fatal = $::os_service_default,
$max_limit = $::os_service_default,
$compute_link_prefix = $::os_service_default,
$glance_link_prefix = $::os_service_default,
@ -420,6 +426,7 @@ as a standalone service, or httpd for being run by a httpd server")
'api/vendordata_dynamic_targets': value => $vendordata_dynamic_targets_real;
'api/vendordata_dynamic_connect_timeout': value => $vendordata_dynamic_connect_timeout;
'api/vendordata_dynamic_read_timeout': value => $vendordata_dynamic_read_timeout;
'api/vendordata_dynamic_failure_fatal': value => $vendordata_dynamic_failure_fatal;
'api/max_limit': value => $max_limit_real;
'api/compute_link_prefix': value => $compute_link_prefix_real;
'api/glance_link_prefix': value => $glance_link_prefix_real;

View File

@ -0,0 +1,5 @@
---
features:
- Adds the vendordata_dynamic_failure_fatal option to the API manifest.
Which, if set to true, makes nova take errors that happened in the
vendordata plugins as fatal.

View File

@ -62,6 +62,7 @@ describe 'nova::api' do
is_expected.to contain_nova_config('api/vendordata_dynamic_targets').with('value' => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('api/vendordata_dynamic_connect_timeout').with('value' => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('api/vendordata_dynamic_read_timeout').with('value' => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('api/vendordata_dynamic_failure_fatal').with('value' => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('api/max_limit').with('value' => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('api/compute_link_prefix').with('value' => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('api/glance_link_prefix').with('value' => '<SERVICE DEFAULT>')
@ -101,6 +102,7 @@ describe 'nova::api' do
:vendordata_dynamic_targets => ['join@http://127.0.0.1:9999/v1/'],
:vendordata_dynamic_connect_timeout => 30,
:vendordata_dynamic_read_timeout => 30,
:vendordata_dynamic_failure_fatal => false,
:osapi_max_limit => 1000,
:osapi_compute_link_prefix => 'https://10.0.0.1:7777/',
:osapi_glance_link_prefix => 'https://10.0.0.1:6666/',
@ -145,6 +147,7 @@ describe 'nova::api' do
is_expected.to contain_nova_config('api/vendordata_dynamic_targets').with('value' => 'join@http://127.0.0.1:9999/v1/')
is_expected.to contain_nova_config('api/vendordata_dynamic_connect_timeout').with('value' => '30')
is_expected.to contain_nova_config('api/vendordata_dynamic_read_timeout').with('value' => '30')
is_expected.to contain_nova_config('api/vendordata_dynamic_failure_fatal').with('value' => false)
is_expected.to contain_nova_config('api/max_limit').with('value' => '1000')
is_expected.to contain_nova_config('api/compute_link_prefix').with('value' => 'https://10.0.0.1:7777/')
is_expected.to contain_nova_config('api/glance_link_prefix').with('value' => 'https://10.0.0.1:6666/')