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
This commit is contained in:
Takashi Kajinami 2024-08-08 13:23:28 +09:00
parent 84690bdf17
commit a4d9425fe8

View File

@ -332,27 +332,29 @@ class neutron::server (
'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'],
}
}
}