Merge "Place VMs on different computes in MTU tests"
This commit is contained in:
@@ -1052,6 +1052,52 @@ class BaseTempestWhiteboxTestCase(base.BaseTempestTestCase):
|
|||||||
LOG.debug('Command for resource creation succeeded')
|
LOG.debug('Command for resource creation succeeded')
|
||||||
return _id
|
return _id
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def is_vlan_tenant_enabled(cls, msg='', skip_if_fails=False):
|
||||||
|
if cls.is_devstack:
|
||||||
|
for node in cls.nodes:
|
||||||
|
if not node['is_controller']:
|
||||||
|
continue
|
||||||
|
if not cls.check_service_setting(
|
||||||
|
host=node, service='',
|
||||||
|
config_files=[cls.neutron_conf],
|
||||||
|
section='ml2', param='tenant_network_types',
|
||||||
|
value='vlan', msg=msg, skip_if_fails=skip_if_fails):
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
return cls.check_service_setting(
|
||||||
|
{'client': cls.proxy_host_client},
|
||||||
|
config_files=cls.get_configs_of_service(), section='ml2',
|
||||||
|
param='tenant_network_types', value='vlan', msg=msg,
|
||||||
|
skip_if_fails=skip_if_fails)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def is_dvr_ovn_enabled(cls, msg='', skip_if_fails=False):
|
||||||
|
if cls.is_devstack:
|
||||||
|
for node in cls.nodes:
|
||||||
|
if not node['is_controller']:
|
||||||
|
continue
|
||||||
|
if not cls.check_service_setting(
|
||||||
|
host=node, service='', config_files=[cls.neutron_conf],
|
||||||
|
param='enable_dvr', msg=msg, skip_if_fails=skip_if_fails
|
||||||
|
) or not cls.check_service_setting(
|
||||||
|
host=node, service='', config_files=[cls.neutron_conf],
|
||||||
|
param='router_distributed', msg=msg,
|
||||||
|
skip_if_fails=skip_if_fails
|
||||||
|
) or not cls.check_service_setting(
|
||||||
|
host=node, service='',
|
||||||
|
config_files=[WB_CONF.ml2_plugin_config],
|
||||||
|
section='ovn', param='enable_distributed_floating_ip',
|
||||||
|
msg=msg, skip_if_fails=skip_if_fails
|
||||||
|
):
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
return cls.check_service_setting(
|
||||||
|
{'client': cls.proxy_host_client},
|
||||||
|
config_files=cls.get_configs_of_service(), section='ovn',
|
||||||
|
param='enable_distributed_floating_ip',
|
||||||
|
skip_if_fails=skip_if_fails)
|
||||||
|
|
||||||
|
|
||||||
class BaseTempestTestCaseAdvanced(BaseTempestWhiteboxTestCase):
|
class BaseTempestTestCaseAdvanced(BaseTempestWhiteboxTestCase):
|
||||||
"""Base class skips test suites unless advanced image is available,
|
"""Base class skips test suites unless advanced image is available,
|
||||||
|
|||||||
@@ -52,31 +52,11 @@ class OvnDvrBase(base.TrafficFlowTest, base.BaseTempestTestCaseOvn):
|
|||||||
raise cls.skipException(
|
raise cls.skipException(
|
||||||
"The tests require environment with at least 2 nodes")
|
"The tests require environment with at least 2 nodes")
|
||||||
cls.bgp_expose_tenant_networks = False
|
cls.bgp_expose_tenant_networks = False
|
||||||
for node in cls.nodes:
|
cls.is_dvr_ovn_enabled(msg=msg, skip_if_fails=True)
|
||||||
if cls.is_devstack:
|
# TODO(rsafrono) add code that defines
|
||||||
if not node['is_controller']:
|
# cls.bgp_expose_tenant_networks on devstack
|
||||||
continue
|
# in case such bgp environment will be ever created
|
||||||
cls.check_service_setting(
|
|
||||||
host=node, service='',
|
|
||||||
config_files=[cls.neutron_conf],
|
|
||||||
param='enable_dvr')
|
|
||||||
cls.check_service_setting(
|
|
||||||
host=node, service='',
|
|
||||||
config_files=[cls.neutron_conf],
|
|
||||||
param='router_distributed')
|
|
||||||
cls.check_service_setting(
|
|
||||||
host=node, service='',
|
|
||||||
config_files=[WB_CONF.ml2_plugin_config],
|
|
||||||
section='ovn', param='enable_distributed_floating_ip')
|
|
||||||
# TODO(rsafrono) add code that defines
|
|
||||||
# cls.bgp_expose_tenant_networks on devstack
|
|
||||||
# in case such bgp environment will be ever created
|
|
||||||
if not cls.is_devstack:
|
if not cls.is_devstack:
|
||||||
config_files = cls.get_configs_of_service()
|
|
||||||
cls.check_service_setting(
|
|
||||||
{'client': cls.proxy_host_client},
|
|
||||||
config_files=config_files, section='ovn',
|
|
||||||
param='enable_distributed_floating_ip', msg=msg)
|
|
||||||
if WB_CONF.bgp:
|
if WB_CONF.bgp:
|
||||||
for node in cls.nodes:
|
for node in cls.nodes:
|
||||||
if node['is_networker'] and not node['is_controller']:
|
if node['is_networker'] and not node['is_controller']:
|
||||||
|
|||||||
@@ -161,11 +161,23 @@ class GatewayMtuTest(base.TrafficFlowTest, base.BaseTempestTestCaseOvn):
|
|||||||
self.local_client = ext_vm_ssh_client
|
self.local_client = ext_vm_ssh_client
|
||||||
|
|
||||||
# We'll use the default self.server as a proxy for no-FIP scenario
|
# We'll use the default self.server as a proxy for no-FIP scenario
|
||||||
self.server = self._create_server()
|
# TODO(rxiao): Temporary workaround for known issue with DVR + VLAN
|
||||||
|
# tenant network. Place proxy server `server` and test server
|
||||||
|
# `test_server` on a different compute than the external server
|
||||||
|
# `ext_vm`. Remove the if block and keep only the else path once
|
||||||
|
# OSPRH-17095 is resolved.
|
||||||
|
if (not self.is_devstack and not self.is_setup_single_compute() and
|
||||||
|
self.is_vlan_tenant_enabled() and self.is_dvr_ovn_enabled()):
|
||||||
|
different_host = {'different_host': [ext_vm['server']['id']]}
|
||||||
|
self.server = self._create_server(scheduler_hints=different_host)
|
||||||
|
self.test_server = self._create_server(
|
||||||
|
create_floating_ip=False, scheduler_hints=different_host)
|
||||||
|
else:
|
||||||
|
self.server = self._create_server()
|
||||||
|
self.test_server = self._create_server(create_floating_ip=False)
|
||||||
server_ssh_client = ssh.Client(
|
server_ssh_client = ssh.Client(
|
||||||
self.server['fip']['floating_ip_address'],
|
self.server['fip']['floating_ip_address'],
|
||||||
self.username, pkey=self.keypair['private_key'])
|
self.username, pkey=self.keypair['private_key'])
|
||||||
self.test_server = self._create_server(create_floating_ip=False)
|
|
||||||
test_server_ip = self.test_server['port']['fixed_ips'][0]['ip_address']
|
test_server_ip = self.test_server['port']['fixed_ips'][0]['ip_address']
|
||||||
self.test_server_client = ssh.Client(
|
self.test_server_client = ssh.Client(
|
||||||
test_server_ip, self.username,
|
test_server_ip, self.username,
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
(^whitebox_neutron_tempest_plugin.tests.scenario.test_router_flavors)|\
|
(^whitebox_neutron_tempest_plugin.tests.scenario.test_router_flavors)|\
|
||||||
(^whitebox_neutron_tempest_plugin.tests.scenario.test_security_group_logging)|\
|
(^whitebox_neutron_tempest_plugin.tests.scenario.test_security_group_logging)|\
|
||||||
(^whitebox_neutron_tempest_plugin.tests.scenario.test_l3ha_ovn)|\
|
(^whitebox_neutron_tempest_plugin.tests.scenario.test_l3ha_ovn)|\
|
||||||
(^whitebox_neutron_tempest_plugin.tests.scenario.test_mtu)|\
|
|
||||||
(test_multicast.*restart)|\
|
(test_multicast.*restart)|\
|
||||||
(test_multicast.*ext*)|\
|
(test_multicast.*ext*)|\
|
||||||
(^whitebox_neutron_tempest_plugin.*test_qos_user_policies)|\
|
(^whitebox_neutron_tempest_plugin.*test_qos_user_policies)|\
|
||||||
@@ -434,8 +433,6 @@
|
|||||||
service_providers:
|
service_providers:
|
||||||
service_provider: "L3_ROUTER_NAT:user-defined:neutron.services.ovn_l3.service_providers.user_defined.UserDefined"
|
service_provider: "L3_ROUTER_NAT:user-defined:neutron.services.ovn_l3.service_providers.user_defined.UserDefined"
|
||||||
tempest_concurrency: 1
|
tempest_concurrency: 1
|
||||||
# (rsafrono) whitebox_neutron_tempest_plugin.tests.scenario.test_mtu are not enabled on devstack
|
|
||||||
# due to https://bugs.launchpad.net/neutron/+bug/2060828
|
|
||||||
tempest_test_regex: "\
|
tempest_test_regex: "\
|
||||||
(^whitebox_neutron_tempest_plugin.tests.scenario.test_metadata_rate_limiting)|\
|
(^whitebox_neutron_tempest_plugin.tests.scenario.test_metadata_rate_limiting)|\
|
||||||
(^whitebox_neutron_tempest_plugin.tests.scenario.test_router_flavors)|\
|
(^whitebox_neutron_tempest_plugin.tests.scenario.test_router_flavors)|\
|
||||||
|
|||||||
Reference in New Issue
Block a user