Limit usage of resources in the fullstack tests job
To limit usage of resources (mostly memory) in the fullstack job and
to avoid oom killer to kill e.g. mysqld service, this patch:
* Makes number of API workers changeable by tests, as a parameter to
EnvironmentDescription and defaults its value to 1. As neutron server
is spawned separately for each test and is used only to process just
few API requests during that single test so this should be still
enough there, and where more API workers are needed (like some dhcp HA
tests: TestDhcpAgentHARaceCondition) it can be changed,
* reduces number of test run workers from 4 to 3 - job will run slower
but hopefully more stable,
* in the functional and fullstack tests job definition disable etcd3
service - this will not save us a lot of memory but still it's not
needed at all so why to run it there.
Conflicts:
neutron/tests/fullstack/resources/environment.py
neutron/tests/fullstack/test_dhcp_agent.py
zuul.d/base.yaml
Change-Id: If19803ab6db144e2d17d6805d379c1c76d8fa343
Closes-Bug: #1906366
(cherry picked from commit f63dc09206
)
This commit is contained in:
parent
c9416b1013
commit
6d1c96e36e
|
@ -124,6 +124,7 @@
|
||||||
devstack_services:
|
devstack_services:
|
||||||
# Ignore any default set by devstack. Emit a "disable_all_services".
|
# Ignore any default set by devstack. Emit a "disable_all_services".
|
||||||
base: false
|
base: false
|
||||||
|
etcd3: false
|
||||||
devstack_localrc:
|
devstack_localrc:
|
||||||
USE_PYTHON3: true
|
USE_PYTHON3: true
|
||||||
INSTALL_TESTONLY_PACKAGES: true
|
INSTALL_TESTONLY_PACKAGES: true
|
||||||
|
|
|
@ -83,7 +83,7 @@ class NeutronConfigFixture(ConfigFixture):
|
||||||
'password': rabbitmq_environment.password,
|
'password': rabbitmq_environment.password,
|
||||||
'host': rabbitmq_environment.host,
|
'host': rabbitmq_environment.host,
|
||||||
'vhost': rabbitmq_environment.vhost},
|
'vhost': rabbitmq_environment.vhost},
|
||||||
'api_workers': '2',
|
'api_workers': str(env_desc.api_workers),
|
||||||
},
|
},
|
||||||
'database': {
|
'database': {
|
||||||
'connection': connection,
|
'connection': connection,
|
||||||
|
|
|
@ -40,7 +40,7 @@ class EnvironmentDescription(object):
|
||||||
global_mtu=constants.DEFAULT_NETWORK_MTU,
|
global_mtu=constants.DEFAULT_NETWORK_MTU,
|
||||||
debug_iptables=False, log=False, report_bandwidths=False,
|
debug_iptables=False, log=False, report_bandwidths=False,
|
||||||
has_placement=False, placement_port=None,
|
has_placement=False, placement_port=None,
|
||||||
ml2_extension_drivers=None):
|
ml2_extension_drivers=None, api_workers=1):
|
||||||
self.network_type = network_type
|
self.network_type = network_type
|
||||||
self.l2_pop = l2_pop
|
self.l2_pop = l2_pop
|
||||||
self.qos = qos
|
self.qos = qos
|
||||||
|
@ -61,6 +61,7 @@ class EnvironmentDescription(object):
|
||||||
if self.log:
|
if self.log:
|
||||||
self.service_plugins += ',log'
|
self.service_plugins += ',log'
|
||||||
self.ml2_extension_drivers = ml2_extension_drivers
|
self.ml2_extension_drivers = ml2_extension_drivers
|
||||||
|
self.api_workers = api_workers
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tunneling_enabled(self):
|
def tunneling_enabled(self):
|
||||||
|
|
|
@ -36,6 +36,7 @@ class BaseDhcpAgentTest(base.BaseFullStackTestCase):
|
||||||
(constants.AGENT_TYPE_LINUXBRIDGE,
|
(constants.AGENT_TYPE_LINUXBRIDGE,
|
||||||
{'l2_agent_type': constants.AGENT_TYPE_LINUXBRIDGE})
|
{'l2_agent_type': constants.AGENT_TYPE_LINUXBRIDGE})
|
||||||
]
|
]
|
||||||
|
api_workers = 1
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
host_descriptions = [
|
host_descriptions = [
|
||||||
|
@ -48,7 +49,8 @@ class BaseDhcpAgentTest(base.BaseFullStackTestCase):
|
||||||
environment.EnvironmentDescription(
|
environment.EnvironmentDescription(
|
||||||
l2_pop=False,
|
l2_pop=False,
|
||||||
arp_responder=False,
|
arp_responder=False,
|
||||||
agent_down_time=self.agent_down_time),
|
agent_down_time=self.agent_down_time,
|
||||||
|
api_workers=self.api_workers),
|
||||||
host_descriptions)
|
host_descriptions)
|
||||||
|
|
||||||
super(BaseDhcpAgentTest, self).setUp(env)
|
super(BaseDhcpAgentTest, self).setUp(env)
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -96,7 +96,7 @@ deps =
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/generate_dhclient_script_for_fullstack.sh {envdir}
|
{toxinidir}/tools/generate_dhclient_script_for_fullstack.sh {envdir}
|
||||||
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
||||||
stestr run --concurrency 4 {posargs}
|
stestr run --concurrency 3 {posargs}
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
|
Loading…
Reference in New Issue