Upgrade Rally and PerfKit

* Also add Plugin Scenario to boot persisting instances with a volume

Change-Id: Ia06b3336a6856e83b76114d6ddaff2aee5bd20fa
This commit is contained in:
akrzos 2017-12-14 16:15:32 -05:00 committed by Alex Krzos
parent 62f87fec30
commit 8c84205e01
18 changed files with 357 additions and 152 deletions

View File

@ -31,7 +31,7 @@ browbeat_venv: "{{browbeat_path}}/.browbeat-venv"
rally_venv: "{{browbeat_path}}/.rally-venv"
# Rally version to install
rally_version: 0.9.1
rally_version: 0.10.1
# The default Shaker venv
shaker_venv: "{{browbeat_path}}/.shaker-venv"
@ -41,7 +41,7 @@ shaker_version: 1.1.0
# PerfKitBenchmarker Settings
perfkit_venv: "{{browbeat_path}}/.perfkit-venv"
perfkit_version: v1.12.0
perfkit_version: v1.13.0
# Configuration items to adjust browbeat results served through httpd
browbeat_results_port: 9001

View File

@ -21,12 +21,12 @@
version: "{{ rally_version }}"
virtualenv: "{{ rally_venv }}"
# https://github.com/openstack/rally/blob/master/requirements.txt#L6
# remove when os-faults is fixed and rally is upgraded
- name: Downgrade ansible in Rally venv
# (akrzos) Rally 0.10.1 installs a version (4.0.0) of gnocchiclient which deprecated service_type
# session option.
- name: Downgrade gnocchiclient in Rally venv
pip:
name: ansible
version: 2.3.2.0
name: gnocchiclient
version: 3.3.1
virtualenv: "{{ rally_venv }}"
- name: Install elasticsearch into rally-venv

View File

@ -89,7 +89,7 @@ class Rally(workloadbase.WorkloadBase):
self.scenario_count += 1
def get_task_id(self, test_name):
cmd = "grep \"rally task results\" {}.log | awk '{{print $4}}'".format(
cmd = "grep \"rally task report [a-z0-9\-]* --out\" {}.log | awk '{{print $4}}'".format(
test_name)
return self.tools.run_cmd(cmd)['stdout']

View File

@ -0,0 +1,143 @@
# Stress test designed for telemetry services (ceilometer, gnocchi) by
# booting persisting xtiny cirros instances. It boots 100 each iteration
# with a concurrency of 20 instances. A total of 1000 instances are
# booted. The instances have a volume.
browbeat:
cloud_name: openstack
rerun: 1
rerun_type: iteration
ansible:
hosts: ansible/hosts
metadata_playbook: ansible/gather/site.yml
ssh_config: ansible/ssh-config
elasticsearch:
enabled: false
host: 1.1.1.1
port: 9200
regather: false
metadata_files:
- name: hardware-metadata
file: metadata/hardware-metadata.json
- name: environment-metadata
file: metadata/environment-metadata.json
- name: software-metadata
file: metadata/software-metadata.json
- name: version
file: metadata/version.json
grafana:
enabled: true
host: example.grafana.com
port: 3000
dashboards:
- openstack-general-system-performance
perfkit:
sleep_before: 0
sleep_after: 0
default:
image: centos7
machine_type: m1.small
os_type: rhel
openstack_image_username: centos
openstack_floating_ip_pool: browbeat_public
openstack_network: browbeat_private
timing_measurements: runtimes
ignore_package_requirements: true
rally:
sleep_before: 0
sleep_after: 0
plugins:
- browbeat: rally/rally-plugins/browbeat
- nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron
shaker:
server: 1.1.1.1
port: 5555
flavor: m1.small
join_timeout: 600
sleep_before: 0
sleep_after: 0
shaker_region: regionOne
external_host: 2.2.2.2
yoda:
instackenv: "/home/stack/instackenv.json"
stackrc: "/home/stack/stackrc"
workloads:
# Boots a total of 1000 instances, 100 at a time with 30minutes between booting storms
- name: BrowbeatNovaPersistWithVolume01
enabled: true
type: rally
concurrency:
- 20
times: 100
scenarios:
- name: nova-boot-persist-with-volume-100-01
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml
- name: nova-boot-persist-with-volume-100-02
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml
- name: nova-boot-persist-with-volume-100-03
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml
- name: nova-boot-persist-with-volume-100-04
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml
- name: nova-boot-persist-with-volume-100-05
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml
- name: nova-boot-persist-with-volume-100-06
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml
- name: nova-boot-persist-with-volume-100-07
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml
- name: nova-boot-persist-with-volume-100-08
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml
- name: nova-boot-persist-with-volume-100-09
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml
- name: nova-boot-persist-with-volume-100-10
enabled: true
image_name: cirros
flavor_name: m1.xtiny
volume_size: 1
cleanup_delay: 1800
file: rally/rally-plugins/nova/nova_boot_persist_with_volume.yml

View File

@ -20,6 +20,11 @@ Scenario - nova_boot_persist
This scenario creates instances without a network that persist upon completion of a rally run. This scenario is best used for excerising the Telemetry systems within an OpenStack Cloud. Alternatively, it can be used to put idle instances on a cloud for other workloads to compete for resources. The scenario is referenced in the Telemetry Browbeat configurations in order to build a "stepped" workload that can be used to analyze Telemetry performance and scalability.
Scenario - nova_boot_persist_with_volume
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This scenario creates instances that have an attached volume and persist upon completion of a rally run. This scenario is best used for excerising the Telemetry systems within an OpenStack Cloud. It increases the Telemetry workload by creating more resources that the Telemetry services must collect and process metrics over. Alternatively, it can be used to put idle instances on a cloud for other workloads to compete for resources. The scenario is referenced in the Telemetry Browbeat configurations in order to build a "stepped" workload that can be used to analyze Telemetry scalability.
Scenario - nova_boot_persist_with_network
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -12,7 +12,6 @@
import time
from rally.common.i18n import _
from rally.common import logging
from rally.task import context
from rally import consts
@ -41,13 +40,11 @@ class BrowbeatDelay(context.Context):
"additionalProperties": False
}
@logging.log_task_wrapper(LOG.info, _("Enter context: `browbeat_delay`"))
def setup(self):
if self.config.get('setup_delay'):
LOG.info('Setup Delaying: {}'.format(self.config.get('setup_delay')))
time.sleep(self.config.get('setup_delay'))
@logging.log_task_wrapper(LOG.info, _("Exit context: `browbeat_delay`"))
def cleanup(self):
if self.config.get('cleanup_delay'):
LOG.info('Cleanup Delaying: {}'.format(self.config.get('cleanup_delay')))

View File

@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from rally.plugins.openstack.scenarios.glance import utils as glance_utils
from rally.plugins.openstack.scenarios.glance.images import GlanceBasic
from rally.plugins.openstack.scenarios.neutron import utils as neutron_utils
from rally.plugins.openstack.scenarios.nova import utils as nova_utils
from rally.task import scenario
@ -19,22 +19,23 @@ from rally.task import validation
from rally import consts
@types.convert(flavor={"type": "nova_flavor"},
image_location={"type": "path_or_url"})
@validation.required_services(consts.Service.GLANCE, consts.Service.NEUTRON, consts.Service.NOVA)
@validation.required_openstack(users=True)
@scenario.configure(context={"cleanup": ["glance", "neutron", "nova"]},
name="BrowbeatPlugin.glance_create_boot_delete")
class GlanceCreateBootDelete(glance_utils.GlanceScenario,
neutron_utils.NeutronScenario,
nova_utils.NovaScenario):
@types.convert(flavor={"type": "nova_flavor"}, image_location={"type": "path_or_url"})
@validation.add("required_services",
services=[consts.Service.GLANCE, consts.Service.NEUTRON, consts.Service.NOVA])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={"cleanup@openstack": ["glance", "neutron", "nova"]},
name="BrowbeatPlugin.glance_create_boot_delete",
platform="openstack")
class GlanceCreateBootDelete(GlanceBasic, neutron_utils.NeutronScenario, nova_utils.NovaScenario):
def run(self, container_format, image_location, disk_format, flavor,
network_create_args=None, subnet_create_args=None, **kwargs):
image = self._create_image(container_format, image_location, disk_format, **kwargs)
image = self.glance.create_image(
container_format=container_format, image_location=image_location,
disk_format=disk_format)
net = self._create_network(network_create_args or {})
self._create_subnet(net, subnet_create_args or {})
kwargs['nics'] = [{'net-id': net['network']['id']}]
server = self._boot_server(image.id, flavor, **kwargs)
self._delete_server(server)
self._delete_image(image)
self.glance.delete_image(image.id)

View File

@ -12,14 +12,13 @@
import uuid
from rally.common.i18n import _
from rally.plugins.openstack import osclients
from rally.plugins.openstack import scenario
from rally.common import logging
from rally.task import atomic
from rally.task import context
from rally.task import validation
from rally import consts
from rally import osclients
LOG = logging.getLogger(__name__)
@ -129,9 +128,9 @@ class GnocchiScenario(scenario.OpenStackScenario):
return gnocchi_client.status.get(detailed)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.archive_policy_list')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.archive_policy_list", platform="openstack")
class ArchivePolicyList(GnocchiScenario):
def run(self):
@ -140,9 +139,9 @@ class ArchivePolicyList(GnocchiScenario):
self._archive_policy_list(gnocchi_client)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.archive_policy_rule_list')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.archive_policy_rule_list", platform="openstack")
class ArchivePolicyRuleList(GnocchiScenario):
def run(self):
@ -151,9 +150,9 @@ class ArchivePolicyRuleList(GnocchiScenario):
self._archive_policy_rule_list(gnocchi_client)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.capabilities_list')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.capabilities_list", platform="openstack")
class CapabilitiesList(GnocchiScenario):
def run(self):
@ -162,9 +161,9 @@ class CapabilitiesList(GnocchiScenario):
self._capabilities_list(gnocchi_client)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_archive_policy')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_archive_policy", platform="openstack")
class CreateArchivePolicy(GnocchiScenario):
def run(self):
@ -176,9 +175,9 @@ class CreateArchivePolicy(GnocchiScenario):
self._create_archive_policy(gnocchi_client, name, definition, aggregation_methods)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_delete_archive_policy')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_delete_archive_policy", platform="openstack")
class CreateDeleteArchivePolicy(GnocchiScenario):
def run(self):
@ -191,9 +190,9 @@ class CreateDeleteArchivePolicy(GnocchiScenario):
self._delete_archive_policy(gnocchi_client, name)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_archive_policy_rule')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_archive_policy_rule", platform="openstack")
class CreateArchivePolicyRule(GnocchiScenario):
def run(self):
@ -205,9 +204,9 @@ class CreateArchivePolicyRule(GnocchiScenario):
self._create_archive_policy_rule(gnocchi_client, name, metric_pattern, archive_policy_name)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_delete_archive_policy_rule')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_delete_archive_policy_rule", platform="openstack")
class CreateDeleteArchivePolicyRule(GnocchiScenario):
def run(self):
@ -220,9 +219,9 @@ class CreateDeleteArchivePolicyRule(GnocchiScenario):
self._delete_archive_policy_rule(gnocchi_client, name)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_metric')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_metric", platform="openstack")
class CreateMetric(GnocchiScenario):
def run(self, metric_name=None, archive_policy_name=None, unit=None, resource_id=None):
@ -231,9 +230,9 @@ class CreateMetric(GnocchiScenario):
self._create_metric(gnocchi_client, metric_name, archive_policy_name, unit, resource_id)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_delete_metric')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_delete_metric", platform="openstack")
class CreateDeleteMetric(GnocchiScenario):
def run(self, metric_name=None, archive_policy_name=None, unit=None, resource_id=None):
@ -244,9 +243,9 @@ class CreateDeleteMetric(GnocchiScenario):
self._delete_metric(gnocchi_client, metric['id'])
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_resource')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_resource", platform="openstack")
class CreateResource(GnocchiScenario):
def run(self, resource_type):
@ -255,9 +254,9 @@ class CreateResource(GnocchiScenario):
self._create_resource(gnocchi_client, resource_type)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_delete_resource')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_delete_resource", platform="openstack")
class CreateDeleteResource(GnocchiScenario):
def run(self, resource_type):
@ -267,9 +266,9 @@ class CreateDeleteResource(GnocchiScenario):
self._delete_resource(gnocchi_client, resource['id'])
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_resource_type')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_resource_type", platform="openstack")
class CreateResourceType(GnocchiScenario):
def run(self):
@ -278,9 +277,9 @@ class CreateResourceType(GnocchiScenario):
self._create_resource_type(gnocchi_client, self.generate_random_name())
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.create_delete_resource_type')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.create_delete_resource_type", platform="openstack")
class CreateDeleteResourceType(GnocchiScenario):
def run(self):
@ -290,10 +289,10 @@ class CreateDeleteResourceType(GnocchiScenario):
self._delete_resource_type(gnocchi_client, resource_type['name'])
@validation.required_contexts("browbeat_gnocchi_metric_list")
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.metric_aggregation')
@validation.add("required_contexts", contexts=("browbeat_gnocchi_metric_list"))
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.metric_aggregation", platform="openstack")
class MetricAggregation(GnocchiScenario):
def run(self, aggregation=None, refresh=False):
@ -306,10 +305,10 @@ class MetricAggregation(GnocchiScenario):
aggregation, refresh)
@validation.required_contexts("browbeat_gnocchi_metric_list")
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.metric_get_measures')
@validation.add("required_contexts", contexts=("browbeat_gnocchi_metric_list"))
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.metric_get_measures", platform="openstack")
class MetricGetMeasures(GnocchiScenario):
def run(self, aggregation=None, refresh=False):
@ -322,9 +321,9 @@ class MetricGetMeasures(GnocchiScenario):
aggregation, refresh)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.metric_list')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.metric_list", platform="openstack")
class MetricList(GnocchiScenario):
def run(self):
@ -333,9 +332,9 @@ class MetricList(GnocchiScenario):
self._metric_list(gnocchi_client)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.resource_list')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.resource_list", platform="openstack")
class ResourceList(GnocchiScenario):
def run(self):
@ -344,9 +343,9 @@ class ResourceList(GnocchiScenario):
self._resource_list(gnocchi_client)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.resource_type_list')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.resource_type_list", platform="openstack")
class ResourceTypeList(GnocchiScenario):
def run(self):
@ -355,9 +354,9 @@ class ResourceTypeList(GnocchiScenario):
self._resource_type_list(gnocchi_client)
@validation.required_services(consts.Service.GNOCCHI)
@validation.required_openstack(admin=True)
@scenario.configure(name='BrowbeatGnocchi.status_get')
@validation.add("required_services", services=[consts.Service.GNOCCHI])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(name="BrowbeatGnocchi.status_get", platform="openstack")
class StatusGet(GnocchiScenario):
def run(self, detailed):
@ -381,7 +380,6 @@ class BrowbeatGnocchiMetricList(context.Context):
}
}
@logging.log_task_wrapper(LOG.info, _("Enter context: `browbeat_gnocchi_metric_list`"))
def setup(self):
gnocchi_client = osclients.Clients(self.context["admin"]["credential"]).gnocchi()
if self.config.get('all'):
@ -394,6 +392,5 @@ class BrowbeatGnocchiMetricList(context.Context):
self.context['metric_ids'] = [x['id'] for x in gnocchi_client.metric.list()]
LOG.debug('Total metric_ids: {}'.format(len(self.context['metric_ids'])))
@logging.log_task_wrapper(LOG.info, _("Exit context: `browbeat_gnocchi_metric_list`"))
def cleanup(self):
pass

View File

@ -19,11 +19,11 @@ from rally import consts
@types.convert(image={"type": "glance_image"}, flavor={"type": "nova_flavor"})
@validation.required_services(consts.Service.NEUTRON, consts.Service.NOVA)
@validation.image_valid_on_flavor("flavor", "image")
@validation.required_openstack(users=True)
@scenario.configure(context={"cleanup": ["neutron", "nova"]},
name="BrowbeatPlugin.create_network_nova_boot")
@validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image")
@validation.add("required_services",services=[consts.Service.NEUTRON, consts.Service.NOVA])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={"cleanup@openstack": ["neutron", "nova"]},
name="BrowbeatPlugin.create_network_nova_boot", platform="openstack")
class CreateNetworkNovaBoot(neutron_utils.NeutronScenario,
nova_utils.NovaScenario):

View File

@ -20,11 +20,12 @@ from rally import consts
@types.convert(image={"type": "glance_image"}, flavor={"type": "nova_flavor"})
@validation.required_services(consts.Service.NEUTRON, consts.Service.NOVA)
@validation.image_valid_on_flavor("flavor", "image")
@validation.required_openstack(users=True)
@scenario.configure(context={"cleanup": ["neutron", "nova"], "keypair": {}, "allow_ssh": None},
name="BrowbeatPlugin.create_network_nova_boot_ping")
@validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image")
@validation.add("required_services", services=[consts.Service.NEUTRON, consts.Service.NOVA])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={"cleanup@openstack": ["neutron", "nova"], "keypair@openstack": {},
"allow_ssh@openstack": None},
name="BrowbeatPlugin.create_network_nova_boot_ping", platform="openstack")
class CreateNetworkNovaBootPing(neutron_utils.NeutronScenario,
vm_utils.VMScenario):

View File

@ -10,7 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.common.i18n import _
from rally.common import logging
from rally.plugins.openstack.context.network import networks
from rally.task import context
@ -53,10 +52,8 @@ class BrowbeatPersistNetwork(networks.Network):
"additionalProperties": True
}
@logging.log_task_wrapper(LOG.info, _("Enter context: `browbeat_persist_network`"))
def setup(self):
super(BrowbeatPersistNetwork, self).setup()
@logging.log_task_wrapper(LOG.info, _("Exit context: `browbeat_persist_network`"))
def cleanup(self):
pass

View File

@ -18,11 +18,11 @@ import subprocess
import time
@validation.required_services(consts.Service.NEUTRON)
@validation.required_openstack(admin=True)
@scenario.configure(context={"cleanup": ["neutron"]},
name="BrowbeatPlugin.PortCreateAssoicate")
class PortCreateAssoicate(neutron_utils.NeutronScenario):
@validation.add("required_services",services=[consts.Service.NEUTRON])
@validation.add("required_platform", platform="openstack", admin=True)
@scenario.configure(context={"cleanup@openstack": ["neutron"]},
name="BrowbeatPlugin.PortCreateAssociate", platform="openstack")
class PortCreateAssociate(neutron_utils.NeutronScenario):
def run(self, hypervisor, num_ports=1, user='heat-admin', ssh_config=None, wait=360,
network_create_args=None, subnet_create_args=None, create_port_args=None, **kwargs):
@ -74,5 +74,5 @@ class PortCreateAssoicate(neutron_utils.NeutronScenario):
subprocess.call(
"{} sudo ovs-vsctl del-port port-{}".format(ssh_cmd, num), shell=True)
for port in ports :
neutron.port_delete(port["port"]["id"])
for port in ports:
self._delete_port(port)

View File

@ -3,7 +3,7 @@
{% set sla_max_failure = sla_max_failure or 0 %}
{% set sla_max_seconds = sla_max_seconds or 60 %}
---
BrowbeatPlugin.PortCreateAssoicate:
BrowbeatPlugin.PortCreateAssociate:
-
args:
network_create_args: {}

View File

@ -16,10 +16,10 @@ from rally.task import validation
from rally import consts
@validation.required_services(consts.Service.NEUTRON)
@validation.required_openstack(users=True)
@scenario.configure(context={"cleanup": ["neutron"]},
name="BrowbeatPlugin.router_subnet_create_delete")
@validation.add("required_services",services=[consts.Service.NEUTRON])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={"cleanup@openstack": ["neutron"]},
name="BrowbeatPlugin.router_subnet_create_delete", platform="openstack")
class RouterSubnetCreateDelete(neutron_utils.NeutronScenario):
def run(self, num_networks=1, network_create_args=None, subnet_create_args=None, **kwargs):

View File

@ -16,10 +16,10 @@ from rally.task import validation
from rally import consts
@validation.required_services(consts.Service.NEUTRON)
@validation.required_openstack(users=True)
@scenario.configure(context={"cleanup": ["neutron"]},
name="BrowbeatPlugin.securitygroup_port")
@validation.add("required_services",services=[consts.Service.NEUTRON])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={"cleanup@openstack": ["neutron"]},
name="BrowbeatPlugin.securitygroup_port", platform="openstack")
class BrowbeatPlugin(neutron_utils.NeutronScenario):
def run(self, network_create_args=None, security_group_create_args={}, port_create_args={},

View File

@ -20,11 +20,11 @@ from rally import consts
@types.convert(image={"type": "glance_image"}, flavor={"type": "nova_flavor"})
@validation.image_valid_on_flavor("flavor", "image")
@validation.required_contexts("browbeat_delay")
@validation.required_services(consts.Service.NOVA)
@validation.required_openstack(users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist")
@validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image")
@validation.add("required_contexts", contexts=("browbeat_delay"))
@validation.add("required_services",services=[consts.Service.NOVA])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist", platform="openstack")
class NovaBootPersist(nova_utils.NovaScenario):
def run(self, image, flavor, **kwargs):
@ -32,12 +32,27 @@ class NovaBootPersist(nova_utils.NovaScenario):
@types.convert(image={"type": "glance_image"}, flavor={"type": "nova_flavor"})
@validation.image_valid_on_flavor("flavor", "image")
@validation.required_contexts("browbeat_delay")
@validation.required_contexts("browbeat_persist_network")
@validation.required_services(consts.Service.NOVA)
@validation.required_openstack(users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist_with_network")
@validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image")
@validation.add("required_contexts", contexts=("browbeat_delay"))
@validation.add("required_services",services=[consts.Service.NOVA, consts.Service.CINDER])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist_with_volume",
platform="openstack")
class NovaBootPersistWithVolume(nova_utils.NovaScenario, cinder_utils.CinderBasic):
def run(self, image, flavor, volume_size, **kwargs):
server = self._boot_server(image, flavor)
volume = self.cinder.create_volume(volume_size)
self._attach_volume(server, volume)
@types.convert(image={"type": "glance_image"}, flavor={"type": "nova_flavor"})
@validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image")
@validation.add("required_contexts", contexts=("browbeat_delay", "browbeat_persist_network"))
@validation.add("required_services",services=[consts.Service.NOVA])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist_with_network",
platform="openstack")
class NovaBootPersistWithNetwork(nova_utils.NovaScenario):
def run(self, image, flavor, **kwargs):
@ -45,42 +60,45 @@ class NovaBootPersistWithNetwork(nova_utils.NovaScenario):
@types.convert(image={"type": "glance_image"}, flavor={"type": "nova_flavor"})
@validation.image_valid_on_flavor("flavor", "image")
@validation.required_contexts("browbeat_delay")
@validation.required_contexts("browbeat_persist_network")
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
@validation.required_openstack(users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist_with_network_volume")
class NovaBootPersistWithNetworkVolume(nova_utils.NovaScenario, cinder_utils.CinderScenario):
@validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image")
@validation.add("required_contexts", contexts=("browbeat_delay", "browbeat_persist_network"))
@validation.add("required_services",services=[consts.Service.NOVA, consts.Service.CINDER])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist_with_network_volume",
platform="openstack")
class NovaBootPersistWithNetworkVolume(nova_utils.NovaScenario, cinder_utils.CinderBasic):
def run(self, image, flavor, volume_size, **kwargs):
server = self._boot_server(image, flavor, **kwargs)
volume = self._create_volume(volume_size)
volume = self.cinder.create_volume(volume_size)
self._attach_volume(server, volume)
@types.convert(image={"type": "glance_image"}, flavor={"type": "nova_flavor"})
@validation.image_valid_on_flavor("flavor", "image")
@validation.required_contexts("browbeat_delay")
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
@validation.required_openstack(users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist_with_network_fip")
@validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image")
@validation.add("required_contexts", contexts=("browbeat_delay"))
@validation.add("required_services",services=[consts.Service.NOVA])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist_with_network_fip",
platform="openstack")
class NovaBootPersistWithNetworkFip(vm_utils.VMScenario):
def run(self, image, flavor, external_net_name, boot_server_kwargs):
server = self._boot_server(image, flavor, **boot_server_kwargs)
self._attach_floating_ip(server, external_net_name)
@types.convert(image={"type": "glance_image"}, flavor={"type": "nova_flavor"})
@validation.image_valid_on_flavor("flavor", "image")
@validation.required_contexts("browbeat_delay")
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
@validation.required_openstack(users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist_with_network_volume_fip")
class NovaBootPersistWithNetworkVolumeFip(vm_utils.VMScenario):
@validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image")
@validation.add("required_contexts", contexts=("browbeat_delay"))
@validation.add("required_services",services=[consts.Service.NOVA, consts.Service.CINDER])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={}, name="BrowbeatNova.nova_boot_persist_with_network_volume_fip",
platform="openstack")
class NovaBootPersistWithNetworkVolumeFip(vm_utils.VMScenario, cinder_utils.CinderBasic):
def run(self, image, flavor, volume_size, boot_server_kwargs, external_net_name):
server = self._boot_server(image, flavor, **boot_server_kwargs)
volume = self._create_volume(volume_size)
volume = self.cinder.create_volume(volume_size)
self._attach_volume(server, volume)
self._attach_floating_ip(server, external_net_name)

View File

@ -0,0 +1,46 @@
{% set image_name = image_name or 'cirros' %}
{% set flavor_name = flavor_name or 'm1.xtiny' %}
{% set setup_delay = setup_delay or 0 %}
{% set cleanup_delay = cleanup_delay or 0 %}
{% set volume_size = volume_size 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 %}
---
BrowbeatNova.nova_boot_persist_with_volume:
-
args:
flavor:
name: '{{flavor_name}}'
image:
name: '{{image_name}}'
volume_size: '{{volume_size}}'
runner:
concurrency: {{concurrency}}
times: {{times}}
type: 'constant'
context:
browbeat_delay:
setup_delay: {{setup_delay}}
cleanup_delay: {{cleanup_delay}}
users:
tenants: 1
users_per_tenant: 8
quotas:
cinder:
gigabytes: -1
volumes: -1
neutron:
network: -1
port: -1
router: -1
subnet: -1
nova:
instances: -1
cores: -1
ram: -1
sla:
max_avg_duration: {{sla_max_avg_duration}}
max_seconds_per_iteration: {{sla_max_seconds}}
failure_rate:
max: {{sla_max_failure}}

View File

@ -32,12 +32,12 @@ LOG = logging.getLogger(__name__)
@types.convert(image={"type": "glance_image"}, flavor={"type": "nova_flavor"})
@validation.required_services(consts.Service.NEUTRON, consts.Service.NOVA)
@validation.image_valid_on_flavor("flavor", "image")
@validation.required_openstack(users=True)
@scenario.configure(context={"cleanup": ["cinder", "neutron", "nova"], "keypair": {},
"allow_ssh": None},
name="BrowbeatPlugin.pbench_uperf")
@validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image")
@validation.add("required_services",services=[consts.Service.NEUTRON, consts.Service.NOVA])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(context={"cleanup@openstack": ["cinder", "neutron", "nova"],
"keypair@openstack": {}, "allow_ssh@openstack": None},
name="BrowbeatPlugin.pbench_uperf", platform="openstack")
class BrowbeatPbenchUperf(neutron_utils.NeutronScenario,
vm_utils.VMScenario):