From 35659b8d918e8e10e8dbbadf29339d04069bceb3 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 13 Dec 2021 23:33:27 +0900 Subject: [PATCH] Deprecate service validation for neutron-server Following the past deprecation in puppet-keystone[1], this change deprecates service validation for neutron-server. [1] 3c95205e0253895e477b9135c10f5175d4166cfc Depends-on: https://review.opendev.org/821585 Change-Id: I173e0d516aeccc61b836573b81141a5dcab6d825 --- manifests/server.pp | 40 ++++++------------- ...e-service-validation-e972b361eb17e21e.yaml | 6 +++ 2 files changed, 18 insertions(+), 28 deletions(-) create mode 100644 releasenotes/notes/deprecate-service-validation-e972b361eb17e21e.yaml diff --git a/manifests/server.pp b/manifests/server.pp index 028fe692e..94084e09d 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -55,10 +55,6 @@ # be set with a value, so that an RPC server will run. # Defaults to $::neutron::params::rpc_service_name # -# [*validate*] -# (Optional) Whether to validate the service is working after any service refreshes -# Defaults to false -# # [*sync_db*] # (Optional) Run neutron-db-manage on api nodes after installing the package. # Defaults to false @@ -229,6 +225,12 @@ # mechanism driver for Neutron. # Defaults to $::os_service_default # +# DEPRECATED PARAMETERS +# +# [*validate*] +# (Optional) Whether to validate the service is working after any service refreshes +# Defaults to undef +# class neutron::server ( $package_ensure = 'present', $enabled = true, @@ -239,7 +241,6 @@ class neutron::server ( $api_service_name = $::neutron::params::api_service_name, $rpc_package_name = $::neutron::params::rpc_package_name, $rpc_service_name = $::neutron::params::rpc_service_name, - $validate = false, $sync_db = false, $api_workers = $::os_workers, $rpc_workers = $::os_workers, @@ -268,12 +269,18 @@ class neutron::server ( $max_request_body_size = $::os_service_default, $ovs_integration_bridge = $::os_service_default, $igmp_snooping_enable = $::os_service_default, + # DEPRECATED PARAMETERS + $validate = undef, ) inherits neutron::params { include neutron::deps include neutron::db include neutron::policy + if $validate != undef { + warning('The neutron::server::validate parameter has been deprecated and has no effect') + } + if !is_service_default($default_availability_zones) { validate_legacy(Array, 'validate_array', $default_availability_zones) } @@ -482,27 +489,4 @@ class neutron::server ( } } } - - # The service validation is required by Debian and Ubuntu, because the - # server takes too much time to be fully up after the service starts. - if $validate { - $keystone_project_name = $::neutron::keystone::authtoken::project_name - $keystone_username = $::neutron::keystone::authtoken::username - $keystone_password = $::neutron::keystone::authtoken::password - $keystone_www_uri = $::neutron::keystone::authtoken::www_authenticate_uri - - $validation_cmd = { - 'neutron-server' => { - 'environment' => ["OS_PASSWORD=${keystone_password}"], - # lint:ignore:140chars - 'unless' => "openstack --os-auth-url ${keystone_www_uri} --os-project-name ${keystone_project_name} --os-username ${keystone_username} --os-identity-api-version 3 network list", - 'command' => "openstack --os-auth-url ${keystone_www_uri} --os-project-name ${keystone_project_name} --os-username ${keystone_username} --os-identity-api-version 3 network list", - # lint:endignore - 'timeout' => '60', - 'tries' => '30', - 'try_sleep' => '2', - } - } - create_resources('openstacklib::service_validation', $validation_cmd, {'subscribe' => 'Anchor[neutron::service::end]'}) - } } diff --git a/releasenotes/notes/deprecate-service-validation-e972b361eb17e21e.yaml b/releasenotes/notes/deprecate-service-validation-e972b361eb17e21e.yaml new file mode 100644 index 000000000..6c98f6d28 --- /dev/null +++ b/releasenotes/notes/deprecate-service-validation-e972b361eb17e21e.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + The service validation feature of the ``neutron::server`` class is + deprecated, and the ``neutron::server::validate`` parameter has no effect + now.