Add num_tenants to nova_boot_in_batches_with_delay

This patch adds a parameter in browbeat-config.yaml for the
number of tenants to use in nova_boot_in_batches_with_delay.
This is required in scale testing.

Change-Id: Ic7ca0b55a106251390e8e2987774a1c442d0d1fe
This commit is contained in:
Sanjay Chari 2022-12-05 18:07:32 +05:30
parent 2ceb50afdb
commit 6fc3f0fe75
3 changed files with 10 additions and 8 deletions

View File

@ -430,7 +430,8 @@ workloads:
# Setting this value to a small multiple(1x or 2x) of the concurrency is optimal.
# num_iterations_to_delay should always be lesser than iterations_per_batch.
num_iterations_to_delay: 8
num_tenant_networks: 1
num_tenants: 1
num_networks_per_tenant: 1
file: rally/rally-plugins/nova/nova_boot_in_batches_with_delay.yml
- name: netcreate-boot
enabled: true

View File

@ -116,14 +116,14 @@ class NovaBootPersistWithNetworkVolumeFip(vm_utils.VMScenario, cinder_utils.Cind
class NovaBootInBatchesWithDelay(vm_utils.VMScenario):
def run(self, image, flavor, delay_time, iterations_per_batch,
num_iterations_to_delay, num_tenant_networks, concurrency, **kwargs):
num_iterations_to_delay, num_networks_per_tenant, concurrency, **kwargs):
"""Boot VMs in batches with delay in between. This scenario is useful for scaling VMs incrementally.
:param image: image of the VMs to be booted
:param flavor: flavor of the VMs to be booted
:param delay_time: int, time in seconds to delay VM boot in between batches
:param iterations_per_batch: int, number of iterations that can run before delay occurs
:param num_iterations_to_delay: int, number of iterations to delay
:param num_tenant_networks: int, number of tenant networks
:param num_networks_per_tenant: int, number of tenant networks
:param concurrency: int, concurrency passed to rally runner
"""
if iterations_per_batch <= num_iterations_to_delay:
@ -136,7 +136,7 @@ class NovaBootInBatchesWithDelay(vm_utils.VMScenario):
self.context["iteration"], delay_time))
time.sleep(delay_time)
tenant_network_id = self.context["tenant"]["networks"][((self.context["iteration"]-1)
% num_tenant_networks)]["id"]
% num_networks_per_tenant)]["id"]
LOG.info("Iteration {} using tenant network {}".format(self.context["iteration"],
tenant_network_id))
kwargs["nics"] = [{"net-id": tenant_network_id}]

View File

@ -3,7 +3,8 @@
{% set delay_time = delay_time or 600 %}
{% set iterations_per_batch = iterations_per_batch or 5 %}
{% set num_iterations_to_delay = num_iterations_to_delay or 1 %}
{% set num_tenant_networks = num_tenant_networks or 1 %}
{% set num_tenants = num_tenants or 1 %}
{% set num_networks_per_tenant = num_networks_per_tenant or 1 %}
{% set sla_max_avg_duration = sla_max_avg_duration or 60 %}
{% set sla_max_failure = sla_max_failure or 0 %}
{% set sla_max_seconds = sla_max_seconds or 60 %}
@ -18,7 +19,7 @@ BrowbeatNova.nova_boot_in_batches_with_delay:
delay_time: {{delay_time}}
iterations_per_batch: {{iterations_per_batch}}
num_iterations_to_delay: {{num_iterations_to_delay}}
num_tenant_networks: {{num_tenant_networks}}
num_networks_per_tenant: {{num_networks_per_tenant}}
concurrency: {{concurrency}}
runner:
concurrency: {{concurrency}}
@ -26,10 +27,10 @@ BrowbeatNova.nova_boot_in_batches_with_delay:
type: 'constant'
context:
users:
tenants: 1
tenants: {{num_tenants}}
users_per_tenant: 8
network:
networks_per_tenant: {{num_tenant_networks}}
networks_per_tenant: {{num_networks_per_tenant}}
quotas:
neutron:
network: -1