Neutron: Switch use_httpd according to os family

Now deploying neutron api by wsgi server mechanism is recommended, we
should more actively test this scenario. Hide the flag to use this
pattern also in litmus job.

Change-Id: I178808488996adf1e357d21b08ae8249d84f3b0b
This commit is contained in:
Takashi Kajinami 2024-10-26 01:24:38 +09:00
parent 4ac6c4fa38
commit c39f49ed70
6 changed files with 6 additions and 21 deletions

View File

@ -24,12 +24,10 @@ case $facts['os']['family'] {
'Debian': { 'Debian': {
$ipv6 = false $ipv6 = false
$cache_backend = 'memcached' $cache_backend = 'memcached'
$neutron_use_httpd = false
} }
'RedHat': { 'RedHat': {
$ipv6 = true $ipv6 = true
$cache_backend = 'redis' $cache_backend = 'redis'
$neutron_use_httpd = true
} }
default: { default: {
fail("Unsupported osfamily (${facts['os']['family']})") fail("Unsupported osfamily (${facts['os']['family']})")
@ -61,7 +59,6 @@ class { 'openstack_integration::glance':
} }
class { 'openstack_integration::neutron': class { 'openstack_integration::neutron':
notification_topics => ['notifications', 'vitrage_notifications'], notification_topics => ['notifications', 'vitrage_notifications'],
use_httpd => $neutron_use_httpd,
metering_enabled => true, metering_enabled => true,
} }
include openstack_integration::placement include openstack_integration::placement

View File

@ -26,14 +26,12 @@ case $facts['os']['family'] {
$cache_backend = 'memcached' $cache_backend = 'memcached'
$django_cache_backend = 'memcached' $django_cache_backend = 'memcached'
$tooz_backend = 'redis' $tooz_backend = 'redis'
$neutron_use_httpd = false
} }
'RedHat': { 'RedHat': {
$ipv6 = false $ipv6 = false
$cache_backend = 'redis_sentinel' $cache_backend = 'redis_sentinel'
$django_cache_backend = 'redis' $django_cache_backend = 'redis'
$tooz_backend = 'redis_sentinel' $tooz_backend = 'redis_sentinel'
$neutron_use_httpd = true
} }
default: { default: {
fail("Unsupported osfamily (${facts['os']['family']})") fail("Unsupported osfamily (${facts['os']['family']})")
@ -65,7 +63,6 @@ class { 'openstack_integration::glance':
image_encryption => true, image_encryption => true,
} }
class { 'openstack_integration::neutron': class { 'openstack_integration::neutron':
use_httpd => $neutron_use_httpd,
baremetal_enabled => true, baremetal_enabled => true,
metering_enabled => true, metering_enabled => true,
} }

View File

@ -26,12 +26,10 @@ case $facts['os']['family'] {
# NOTE(tkajinam): UCA Caracal does not provide trove packages # NOTE(tkajinam): UCA Caracal does not provide trove packages
# https://bugs.launchpad.net/ubuntu/+source/openstack-trove/+bug/2064838 # https://bugs.launchpad.net/ubuntu/+source/openstack-trove/+bug/2064838
$trove_enabled = false $trove_enabled = false
$neutron_use_httpd = false
} }
'RedHat': { 'RedHat': {
$ipv6 = true $ipv6 = true
$trove_enabled = true $trove_enabled = true
$neutron_use_httpd = true
} }
default: { default: {
fail("Unsupported osfamily (${facts['os']['family']})") fail("Unsupported osfamily (${facts['os']['family']})")
@ -56,8 +54,7 @@ include openstack_integration::keystone
include openstack_integration::glance include openstack_integration::glance
class { 'openstack_integration::neutron': class { 'openstack_integration::neutron':
use_httpd => $neutron_use_httpd, driver => 'ovn',
driver => 'ovn',
} }
include openstack_integration::placement include openstack_integration::placement
class { 'openstack_integration::nova': class { 'openstack_integration::nova':

View File

@ -23,7 +23,6 @@ if $facts['os']['name'] == 'Ubuntu' {
case $facts['os']['family'] { case $facts['os']['family'] {
'Debian': { 'Debian': {
$ipv6 = false $ipv6 = false
$neutron_use_httpd = false
# TODO(tkajinam): Need additional work to load the plugins # TODO(tkajinam): Need additional work to load the plugins
$bgpvpn_enabled = false $bgpvpn_enabled = false
$l2gw_enabled = false $l2gw_enabled = false
@ -33,7 +32,6 @@ case $facts['os']['family'] {
} }
'RedHat': { 'RedHat': {
$ipv6 = true $ipv6 = true
$neutron_use_httpd = true
$bgpvpn_enabled = true $bgpvpn_enabled = true
$l2gw_enabled = true $l2gw_enabled = true
$bgp_dragent_enabled = true $bgp_dragent_enabled = true
@ -66,7 +64,6 @@ class { 'openstack_integration::glance':
} }
class { 'openstack_integration::neutron': class { 'openstack_integration::neutron':
use_httpd => $neutron_use_httpd,
vpnaas_enabled => $vpnaas_enabled, vpnaas_enabled => $vpnaas_enabled,
taas_enabled => $taas_enabled, taas_enabled => $taas_enabled,
bgpvpn_enabled => $bgpvpn_enabled, bgpvpn_enabled => $bgpvpn_enabled,

View File

@ -23,7 +23,6 @@ if $facts['os']['name'] == 'Ubuntu' {
case $facts['os']['family'] { case $facts['os']['family'] {
'Debian': { 'Debian': {
$ipv6 = false $ipv6 = false
$neutron_use_httpd = false
$ovn_metadata_agent_enabled = true $ovn_metadata_agent_enabled = true
$jobboard_backend = 'redis' $jobboard_backend = 'redis'
# TODO(tkajinam): Enable these along with the other plugins # TODO(tkajinam): Enable these along with the other plugins
@ -31,7 +30,6 @@ case $facts['os']['family'] {
} }
'RedHat': { 'RedHat': {
$ipv6 = true $ipv6 = true
$neutron_use_httpd = true
$ovn_metadata_agent_enabled = false $ovn_metadata_agent_enabled = false
$jobboard_backend = 'redis_sentinel' $jobboard_backend = 'redis_sentinel'
$vpnaas_enabled = true $vpnaas_enabled = true
@ -62,7 +60,6 @@ class { 'openstack_integration::glance':
show_multiple_locations => true, show_multiple_locations => true,
} }
class { 'openstack_integration::neutron': class { 'openstack_integration::neutron':
use_httpd => $neutron_use_httpd,
driver => 'ovn', driver => 'ovn',
ovn_metadata_agent_enabled => $ovn_metadata_agent_enabled, ovn_metadata_agent_enabled => $ovn_metadata_agent_enabled,
vpnaas_enabled => $vpnaas_enabled vpnaas_enabled => $vpnaas_enabled

View File

@ -5,10 +5,6 @@
# Can be: openvswitch, linuxbridge or ovn. # Can be: openvswitch, linuxbridge or ovn.
# Defaults to 'openvswitch'. # Defaults to 'openvswitch'.
# #
# [*use_httpd*]
# (optional) Use httpd to run neutron api
# Defaults to false
#
# [*ovn_metadata_agent_enabled*] # [*ovn_metadata_agent_enabled*]
# (optional) Enable ovn-metadata-agent # (optional) Enable ovn-metadata-agent
# Defaults to true # Defaults to true
@ -47,7 +43,6 @@
# #
class openstack_integration::neutron ( class openstack_integration::neutron (
$driver = 'openvswitch', $driver = 'openvswitch',
$use_httpd = false,
$ovn_metadata_agent_enabled = true, $ovn_metadata_agent_enabled = true,
$metering_enabled = false, $metering_enabled = false,
$vpnaas_enabled = false, $vpnaas_enabled = false,
@ -59,6 +54,11 @@ class openstack_integration::neutron (
$notification_topics = $facts['os_service_default'], $notification_topics = $facts['os_service_default'],
) { ) {
$use_httpd = $facts['os']['family'] ? {
'RedHat' => true,
default => false,
}
include openstack_integration::config include openstack_integration::config
include openstack_integration::params include openstack_integration::params