Add verification of mac-table-size values

After BZ1591206 and BZ1592333, ovs bridges mac-table-size has to be
configured to 50000, affecting both ml2/ovs and ml2/ovn deployments

Due to BZ1695122, this verification will only be performed before any
overcloud node is rebooted - this will be changed when BZ1695122 is
resolved

Change-Id: I8bb40e04ba044ed04ffeb8fdffd20d595b0d9168
This commit is contained in:
Eduardo Olivares 2020-11-11 10:56:18 +01:00
parent bc4e996d6a
commit 529602e9ad
3 changed files with 36 additions and 2 deletions

View File

@ -21,6 +21,7 @@ from tobiko.openstack.tests import _nova
test_neutron_agents_are_alive = _neutron.test_neutron_agents_are_alive
test_ovn_dbs_validations = _neutron.test_ovn_dbs_validations
test_ovs_bridges_mac_table_size = _neutron.test_ovs_bridges_mac_table_size
test_evacuable_server_creation = _nova.test_evacuable_server_creation
test_server_creation = _nova.test_server_creation

View File

@ -222,3 +222,30 @@ def test_ovn_dbs_validations():
# run validations
ovn_dbs_are_synchronized(test_case)
ovn_dbs_vip_bindings(test_case)
def test_ovs_bridges_mac_table_size():
test_case = tobiko.get_test_case()
expected_mac_table_size = '50000'
get_mac_table_size_cmd = ('ovs-vsctl get bridge {br_name} '
'other-config:mac-table-size')
if is_ovn_configured():
get_br_mappings_cmd = ('ovs-vsctl get Open_vSwitch . '
'external_ids:ovn-bridge-mappings')
else:
get_br_mappings_cmd = (
'crudini --get /var/lib/config-data/puppet-generated/neutron/'
'etc/neutron/plugins/ml2/openvswitch_agent.ini '
'ovs bridge_mappings')
for node in topology.list_openstack_nodes(group='overcloud'):
br_mappings_str = sh.execute(get_br_mappings_cmd,
ssh_client=node.ssh_client,
sudo=True).stdout.splitlines()[0]
br_list = [br_mapping.split(':')[1] for br_mapping in
br_mappings_str.replace('"', '').split(',')]
for br_name in br_list:
mac_table_size = sh.execute(
get_mac_table_size_cmd.format(br_name=br_name),
ssh_client=node.ssh_client, sudo=True).stdout.splitlines()[0]
test_case.assertEqual(mac_table_size.replace('"', ''),
expected_mac_table_size)

View File

@ -13,7 +13,8 @@ from tobiko.tripleo import undercloud
from tobiko.tripleo import validations
def overcloud_health_checks(passive_checks_only=False):
def overcloud_health_checks(passive_checks_only=False,
skip_mac_table_size_test=True):
# this method will be changed in future commit
check_pacemaker_resources_health()
check_overcloud_processes_health()
@ -28,6 +29,11 @@ def overcloud_health_checks(passive_checks_only=False):
containers.assert_equal_containers_state()
containers.run_container_config_validations()
tests.test_ovn_dbs_validations()
# skip_mac_table_size_test has to be removed when BZ1695122 is resolved
# we need it for the moment because this validation should not be performed
# after any overcloud node is rebooted
if not skip_mac_table_size_test:
tests.test_ovs_bridges_mac_table_size()
validations.run_post_deployment_validations()
@ -54,7 +60,7 @@ class DisruptTripleoNodesTest(testtools.TestCase):
disruptive_action: a function that runs some
disruptive scenarion on a overcloud"""
def test_0vercloud_health_check(self):
overcloud_health_checks()
overcloud_health_checks(skip_mac_table_size_test=False)
def test_hard_reboot_controllers_recovery(self):
overcloud_health_checks()