From c622f1e098200c115678295b6e512a4c321564ef Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 1 Mar 2017 15:36:39 +0000 Subject: [PATCH] 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 --- manifests/api.pp | 7 +++++++ ...-vendordata_dynamic_failure_fatal-e19eade6e6be79b2.yaml | 5 +++++ spec/classes/nova_api_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add-vendordata_dynamic_failure_fatal-e19eade6e6be79b2.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 03979d876..be2cbf70f 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -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; diff --git a/releasenotes/notes/add-vendordata_dynamic_failure_fatal-e19eade6e6be79b2.yaml b/releasenotes/notes/add-vendordata_dynamic_failure_fatal-e19eade6e6be79b2.yaml new file mode 100644 index 000000000..029f339fa --- /dev/null +++ b/releasenotes/notes/add-vendordata_dynamic_failure_fatal-e19eade6e6be79b2.yaml @@ -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. diff --git a/spec/classes/nova_api_spec.rb b/spec/classes/nova_api_spec.rb index 29d45a03c..df0d6508c 100644 --- a/spec/classes/nova_api_spec.rb +++ b/spec/classes/nova_api_spec.rb @@ -62,6 +62,7 @@ describe 'nova::api' do is_expected.to contain_nova_config('api/vendordata_dynamic_targets').with('value' => '') is_expected.to contain_nova_config('api/vendordata_dynamic_connect_timeout').with('value' => '') is_expected.to contain_nova_config('api/vendordata_dynamic_read_timeout').with('value' => '') + is_expected.to contain_nova_config('api/vendordata_dynamic_failure_fatal').with('value' => '') is_expected.to contain_nova_config('api/max_limit').with('value' => '') is_expected.to contain_nova_config('api/compute_link_prefix').with('value' => '') is_expected.to contain_nova_config('api/glance_link_prefix').with('value' => '') @@ -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/')