From 73d39c09c11399a04f270f1c41fb12ac6225a417 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 1 May 2020 19:03:08 +0900 Subject: [PATCH] Replace deprecated configdrive_use_swift Change-Id: I987444c22d3a4d17db902e0d3b35031187f9cbcb --- manifests/conductor.pp | 24 +++++++++++++++---- ...onfigdrive_use_swift-a4a705e26802d931.yaml | 6 +++++ spec/classes/ironic_conductor_spec.rb | 6 ++--- 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/deprecate-conductor-configdrive_use_swift-a4a705e26802d931.yaml diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 0231a35f..d5e1f0ae 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -89,14 +89,14 @@ # inspection_network_name. # Defaults to $::os_service_default # -# [*configdrive_use_swift*] -# (optional) Whether to use Swift for storing config drives instead of +# [*configdrive_use_object_store*] +# (optional) Whether to use object store for storing config drives instead of # the database. Recommended for bigger config drives. # Defaults to $::os_service_default # # [*configdrive_swift_container*] # (optinal) Swift container to use for storing config drives if -# configdrive_use_swift is true. +# configdrive_use_object_store is true. # Defaults to $::os_service_default # # [*inspect_timeout*] @@ -204,6 +204,11 @@ # (optional) Ironic API URL. # Defaults to undef. # +# [*configdrive_use_swift*] +# (optional) Whether to use Swift for storing config drives instead of +# the database. Recommended for bigger config drives. +# Defaults to undef +# class ironic::conductor ( $package_ensure = 'present', $enabled = true, @@ -219,7 +224,7 @@ class ironic::conductor ( $provisioning_network = $::os_service_default, $rescuing_network = $::os_service_default, $inspection_network = $::os_service_default, - $configdrive_use_swift = $::os_service_default, + $configdrive_use_object_store = $::os_service_default, $configdrive_swift_container = $::os_service_default, $inspect_timeout = $::os_service_default, $default_boot_option = $::os_service_default, @@ -242,6 +247,7 @@ class ironic::conductor ( # DEPRECATED PARAMETERS $max_time_interval = undef, $api_url = undef, + $configdrive_use_swift = undef, ) { include ironic::deps @@ -262,6 +268,14 @@ Use ironic::service_catalog::endpoint_override instead') } } + if $configdrive_use_swift != undef { + warning('configdrive_use_swift is deprecated and will be removed \ +in a future release. Use configdrive_use_object_store instead') + $configdrive_use_object_store_real = $configdrive_use_swift + } else { + $configdrive_use_object_store_real = $configdrive_use_object_store + } + if ($cleaning_network_name and !is_service_default($cleaning_network)) { fail('cleaning_network_name and cleaning_network can not be specified at the same time.') } @@ -330,7 +344,7 @@ Use ironic::service_catalog::endpoint_override instead') 'deploy/erase_devices_priority': value => $erase_devices_priority; 'deploy/erase_devices_metadata_priority': value => $erase_devices_metadata_priority; 'deploy/continue_if_disk_secure_erase_fails': value => $continue_if_disk_secure_erase_fails; - 'conductor/configdrive_use_swift': value => $configdrive_use_swift; + 'deploy/configdrive_use_object_store': value => $configdrive_use_object_store_real; 'conductor/configdrive_swift_container': value => $configdrive_swift_container; 'conductor/inspect_wait_timeout': value => $inspect_timeout; 'deploy/default_boot_option': value => $default_boot_option; diff --git a/releasenotes/notes/deprecate-conductor-configdrive_use_swift-a4a705e26802d931.yaml b/releasenotes/notes/deprecate-conductor-configdrive_use_swift-a4a705e26802d931.yaml new file mode 100644 index 00000000..89cd9f9c --- /dev/null +++ b/releasenotes/notes/deprecate-conductor-configdrive_use_swift-a4a705e26802d931.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + The ``ironic::conductor:configdrive_use_swift`` parameter has been + deprecated and will be removed in a future release. Use + ``configdrive_use_object_store`` instead. diff --git a/spec/classes/ironic_conductor_spec.rb b/spec/classes/ironic_conductor_spec.rb index 778435f9..b316e7fe 100644 --- a/spec/classes/ironic_conductor_spec.rb +++ b/spec/classes/ironic_conductor_spec.rb @@ -72,7 +72,7 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('deploy/http_url').with(:value => '') is_expected.to contain_ironic_config('deploy/http_root').with(:value => '') is_expected.to contain_ironic_config('DEFAULT/force_raw_images').with(:value => '') - is_expected.to contain_ironic_config('conductor/configdrive_use_swift').with(:value => '') + is_expected.to contain_ironic_config('deploy/configdrive_use_object_store').with(:value => '') is_expected.to contain_ironic_config('conductor/configdrive_swift_container').with(:value => '') is_expected.to contain_ironic_config('conductor/inspect_wait_timeout').with(:value => '') is_expected.to contain_ironic_config('deploy/default_boot_option').with(:value => '') @@ -100,7 +100,7 @@ describe 'ironic::conductor' do :http_url => 'http://host:port', :http_root => '/src/www', :force_raw_images => false, - :configdrive_use_swift => true, + :configdrive_use_object_store => true, :configdrive_swift_container => 'cont', :inspect_timeout => 600, :default_boot_option => 'local', @@ -132,7 +132,7 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('deploy/http_url').with_value(p[:http_url]) is_expected.to contain_ironic_config('deploy/http_root').with_value(p[:http_root]) is_expected.to contain_ironic_config('DEFAULT/force_raw_images').with_value(p[:force_raw_images]) - is_expected.to contain_ironic_config('conductor/configdrive_use_swift').with_value(p[:configdrive_use_swift]) + is_expected.to contain_ironic_config('deploy/configdrive_use_object_store').with_value(p[:configdrive_use_object_store]) is_expected.to contain_ironic_config('conductor/configdrive_swift_container').with_value(p[:configdrive_swift_container]) is_expected.to contain_ironic_config('conductor/inspect_wait_timeout').with_value(p[:inspect_timeout]) is_expected.to contain_ironic_config('deploy/default_boot_option').with_value(p[:default_boot_option])