From e643c3cd04af27e4406607ac46c4d26fc1adaf39 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 8 Aug 2024 13:23:28 +0900 Subject: [PATCH] server: Skip unnecessary installation of separate packages Currently both neutron-server and separate service packages are installed regardless of the services actually used. However this is quite redundant especially when only neutron-server is used in CentOS. Skip installation of separate packages when the monolithic server service is requested. Change-Id: I72359a2e78c57de57722d01b4c16c0db85189f54 (cherry picked from commit a4d9425fe859c4a6ab322c5985f294368d6149c6) --- manifests/server.pp | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/manifests/server.pp b/manifests/server.pp index 9dffd6e29..c2e483b71 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -359,27 +359,29 @@ the neutron::services::vpnaas class.") 'DEFAULT/enable_default_route_bfd': value => $enable_default_route_bfd; } - if $server_package { - package { 'neutron-server': - ensure => $package_ensure, - name => $::neutron::params::server_package, - tag => ['openstack', 'neutron-package'], + if $service_name { + if $server_package { + package { 'neutron-server': + ensure => $package_ensure, + name => $::neutron::params::server_package, + tag => ['openstack', 'neutron-package'], + } } - } - - if $api_package_name { - package { 'neutron-api': - ensure => $package_ensure, - name => $api_package_name, - tag => ['openstack', 'neutron-package'], + } else { + if $api_package_name { + package { 'neutron-api': + ensure => $package_ensure, + name => $api_package_name, + tag => ['openstack', 'neutron-package'], + } } - } - if $rpc_package_name { - package { 'neutron-rpc-server': - ensure => $package_ensure, - name => $rpc_package_name, - tag => ['openstack', 'neutron-package'], + if $rpc_package_name { + package { 'neutron-rpc-server': + ensure => $package_ensure, + name => $rpc_package_name, + tag => ['openstack', 'neutron-package'], + } } }