Strictly require neutron when nova is enabled

... and remove a few remaining logics to support deployment without
neutron.

Change-Id: Id129a3894f3506862ea139c5221ae8bab029320e
This commit is contained in:
Takashi Kajinami 2024-07-23 16:38:01 +09:00
parent c8d7238ae5
commit d49c9349c1
5 changed files with 24 additions and 38 deletions

View File

@ -52,7 +52,7 @@ Global Options
Specify 'y' to install OpenStack Compute (nova). ['y', 'n']
**CONFIG_NEUTRON_INSTALL**
Specify 'y' to install OpenStack Networking (neutron) ['y']
Specify 'y' to install OpenStack Networking (neutron) ['y', 'n']
**CONFIG_HORIZON_INSTALL**
Specify 'y' to install OpenStack Dashboard (horizon). ['y', 'n']

View File

@ -517,7 +517,11 @@ def initConfig(controller):
def initSequences(controller):
config = controller.CONF
if config['CONFIG_NEUTRON_INSTALL'] != 'y':
if config['CONFIG_NOVA_INSTALL'] == 'y':
raise RuntimeError('Neutron is required to install Nova properly. '
'Please set CONFIG_NEUTRON_INSTALL=y')
return
if config['CONFIG_IRONIC_INSTALL'] == 'y':
config['CONFIG_NEUTRON_ML2_TYPE_DRIVERS'] += ', flat'
config['CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES'] += ', flat'

View File

@ -232,11 +232,6 @@ def initSequences(controller):
if controller.CONF['CONFIG_NOVA_INSTALL'] != 'y':
return
if controller.CONF['CONFIG_NEUTRON_INSTALL'] == 'y':
network_title = ('Preparing OpenStack Network-related '
'Nova entries')
network_function = create_neutron_manifest
novaapisteps = [
{'title': 'Preparing Nova API entries',
'functions': [create_api_manifest]},
@ -250,8 +245,8 @@ def initSequences(controller):
'functions': [create_sched_manifest]},
{'title': 'Preparing Nova VNC Proxy entries',
'functions': [create_vncproxy_manifest]},
{'title': network_title,
'functions': [network_function]},
{'title': 'Preparing OpenStack Network-related Nova entries',
'functions': [create_neutron_manifest]},
{'title': 'Preparing Nova Common entries',
'functions': [create_common_manifest]},
]
@ -449,8 +444,6 @@ def create_vncproxy_manifest(config, messages):
def create_common_manifest(config, messages):
global compute_hosts, network_hosts
network_type = (config['CONFIG_NEUTRON_INSTALL'] == "y" and
'neutron' or 'nova')
network_multi = len(network_hosts) > 1
dbacces_hosts = set([config.get('CONFIG_CONTROLLER_HOST')])
dbacces_hosts |= network_hosts
@ -475,14 +468,7 @@ def create_common_manifest(config, messages):
else:
config['CONFIG_NOVA_SQL_CONN_NOPW'] = sqlconn
# for nova-network in multihost mode each compute host is metadata
# host otherwise we use api host
if (network_type == 'nova' and network_multi and
host in compute_hosts):
metadata = host
else:
metadata = config['CONFIG_CONTROLLER_HOST']
config['CONFIG_NOVA_METADATA_HOST'] = metadata
config['CONFIG_NOVA_METADATA_HOST'] = config['CONFIG_CONTROLLER_HOST']
if config['CONFIG_AMQP_ENABLE_SSL'] == 'y':
nova_hosts = compute_hosts

View File

@ -43,21 +43,19 @@ if lookup('CONFIG_CINDER_INSTALL') == 'y' and
}
}
if lookup('CONFIG_NEUTRON_INSTALL') == 'y' {
include 'packstack::nova::neutron'
include 'packstack::neutron::rabbitmq'
case lookup('CONFIG_NEUTRON_L2_AGENT') {
'openvswitch': { include 'packstack::neutron::ovs_agent' }
'linuxbridge': { include 'packstack::neutron::lb_agent' }
'ovn': { include 'packstack::neutron::ovn_agent'
include 'packstack::neutron::ovn_metadata'
}
default: { include 'packstack::neutron::ovs_agent' }
}
include 'packstack::neutron::bridge'
if 'sriovnicswitch' in lookup('CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS', { merge => 'unique' }) and
lookup('CONFIG_NEUTRON_L2_AGENT') == 'openvswitch' {
include 'packstack::neutron::sriov'
}
include 'packstack::nova::neutron'
include 'packstack::neutron::rabbitmq'
case lookup('CONFIG_NEUTRON_L2_AGENT') {
'openvswitch': { include 'packstack::neutron::ovs_agent' }
'linuxbridge': { include 'packstack::neutron::lb_agent' }
'ovn': { include 'packstack::neutron::ovn_agent'
include 'packstack::neutron::ovn_metadata'
}
default: { include 'packstack::neutron::ovs_agent' }
}
include 'packstack::neutron::bridge'
if 'sriovnicswitch' in lookup('CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS', { merge => 'unique' }) and
lookup('CONFIG_NEUTRON_L2_AGENT') == 'openvswitch' {
include 'packstack::neutron::sriov'
}

View File

@ -77,9 +77,7 @@ if lookup('CONFIG_NOVA_INSTALL') == 'y' {
include 'packstack::nova::sched'
}
include 'packstack::nova::vncproxy'
if lookup('CONFIG_NEUTRON_INSTALL') == 'y' {
include 'packstack::nova::neutron'
}
include 'packstack::nova::neutron'
include 'packstack::placement'
}