From b6e70a57b1d7c496ae6e44e2c34e583d4dd6f2f7 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 12 Jan 2024 18:20:02 +0900 Subject: [PATCH] Remove deprecated use_forwarded_for parameter ... because the option was removed from nova[1]. [1] a5f68d355c97baddf2baf46d9630175d65c36968 Change-Id: I60bcb4b949cecdee75de825bdb7131ac3c4761b9 --- manifests/api.pp | 11 ----------- .../remove-use_forwarded_for-1249eace95ebf469.yaml | 4 ++++ spec/classes/nova_api_spec.rb | 3 --- 3 files changed, 4 insertions(+), 14 deletions(-) create mode 100644 releasenotes/notes/remove-use_forwarded_for-1249eace95ebf469.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 790317011..9dbbd1f87 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -141,11 +141,6 @@ # metadata handling from api class. # Defaults to false # -# [*use_forwarded_for*] -# (optional) Treat X-Forwarded-For as the canonical remote address. Only -# enable this if you have a sanitizing proxy. -# Defaults to undef -# # [*hide_server_address_states*] # (optional) This option is a list of all instance states for which network address # information should not be returned from the API. @@ -191,7 +186,6 @@ class nova::api( $list_records_by_skipping_down_cells = $facts['os_service_default'], # DEPRECATED PARAMETER $nova_metadata_wsgi_enabled = undef, - $use_forwarded_for = undef, $hide_server_address_states = undef, $allow_instance_snapshots = undef, $enable_network_quota = undef, @@ -208,10 +202,6 @@ class nova::api( warning('The nova_metadata_wsgi_enabled parameter has been deprecated and has no effect') } - if $use_forwarded_for != undef { - warning('The use_forwarded_for parameter has been deprecated.') - } - [ 'hide_server_address_states', 'allow_instance_snapshots', @@ -300,7 +290,6 @@ as a standalone service, or httpd for being run by a httpd server") nova_config { 'wsgi/api_paste_config': value => $api_paste_config; 'DEFAULT/password_length': value => $password_length; - 'api/use_forwarded_for': value => pick($use_forwarded_for, $facts['os_service_default']); 'api/max_limit': value => $max_limit; 'api/compute_link_prefix': value => $compute_link_prefix; 'api/glance_link_prefix': value => $glance_link_prefix; diff --git a/releasenotes/notes/remove-use_forwarded_for-1249eace95ebf469.yaml b/releasenotes/notes/remove-use_forwarded_for-1249eace95ebf469.yaml new file mode 100644 index 000000000..8805af50d --- /dev/null +++ b/releasenotes/notes/remove-use_forwarded_for-1249eace95ebf469.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The ``nova::api::use_forwarded_for`` parameter has been removed. diff --git a/spec/classes/nova_api_spec.rb b/spec/classes/nova_api_spec.rb index 70264638c..086c18206 100644 --- a/spec/classes/nova_api_spec.rb +++ b/spec/classes/nova_api_spec.rb @@ -48,7 +48,6 @@ describe 'nova::api' do is_expected.to contain_nova_config('wsgi/api_paste_config').with_value('api-paste.ini') is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen').with_value('') is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with_value('') - is_expected.to contain_nova_config('api/use_forwarded_for').with_value('') is_expected.to contain_nova_config('DEFAULT/metadata_listen').with_value('') is_expected.to contain_nova_config('DEFAULT/metadata_listen_port').with_value('') is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with_value('5') @@ -82,7 +81,6 @@ describe 'nova::api' do :metadata_listen => '127.0.0.1', :metadata_listen_port => 8875, :osapi_compute_listen_port => 8874, - :use_forwarded_for => false, :osapi_compute_workers => 1, :metadata_workers => 2, :enable_proxy_headers_parsing => true, @@ -120,7 +118,6 @@ describe 'nova::api' do is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with_value('8874') is_expected.to contain_nova_config('DEFAULT/metadata_listen').with_value('127.0.0.1') is_expected.to contain_nova_config('DEFAULT/metadata_listen_port').with_value('8875') - is_expected.to contain_nova_config('api/use_forwarded_for').with_value(false) is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with_value('1') is_expected.to contain_nova_config('DEFAULT/metadata_workers').with_value('2') is_expected.to contain_nova_config('api/max_limit').with_value('1000')