From 5fb7b5c397d401d199fdba4e61f50a8d45e8436b Mon Sep 17 00:00:00 2001 From: Sergey Skripnick Date: Mon, 26 Oct 2015 17:46:13 +0200 Subject: [PATCH] Fix sahra-dsvm and sahara-mos jobs The problem is sahara service type is different in MOS and dsvm. Use api_versions context to set 'data_processing' for MOS and 'data-processig' for dsvm. Also add missing service type 'data_processing'. Change-Id: I4c31ec6d2dfa0b4098a0a9a647f052f935df4471 --- rally-jobs/rally-mos.yaml | 36 +--------------- rally-jobs/sahara-clusters.yaml | 32 +++++++++++++++ rally-jobs/sahara.yaml | 41 +++++++++++++++++++ rally/consts.py | 2 + .../openstack/scenarios/sahara/utils.py | 4 ++ 5 files changed, 81 insertions(+), 34 deletions(-) create mode 100644 rally-jobs/sahara-clusters.yaml create mode 100644 rally-jobs/sahara.yaml diff --git a/rally-jobs/rally-mos.yaml b/rally-jobs/rally-mos.yaml index fb556093d3..926f838325 100644 --- a/rally-jobs/rally-mos.yaml +++ b/rally-jobs/rally-mos.yaml @@ -1,4 +1,6 @@ +{%- set sahara_service_type = sahara_service_type|default("data_processing") %} --- +{%- include "sahara.yaml" %} KeystoneBasic.create_user: - @@ -117,40 +119,6 @@ failure_rate: max: 0 - SaharaNodeGroupTemplates.create_and_list_node_group_templates: - - - args: - flavor: - name: "m1.small" - runner: - type: "constant" - times: 1 - concurrency: 1 - context: - users: - tenants: 1 - users_per_tenant: 1 - sla: - failure_rate: - max: 0 - - SaharaNodeGroupTemplates.create_delete_node_group_templates: - - - args: - flavor: - name: "m1.small" - runner: - type: "constant" - times: 1 - concurrency: 1 - context: - users: - tenants: 1 - users_per_tenant: 1 - sla: - failure_rate: - max: 0 - Authenticate.validate_cinder: - args: diff --git a/rally-jobs/sahara-clusters.yaml b/rally-jobs/sahara-clusters.yaml new file mode 100644 index 0000000000..c5c9ab4e7d --- /dev/null +++ b/rally-jobs/sahara-clusters.yaml @@ -0,0 +1,32 @@ +{%- set sahara_service_type = "data-processing" %} +--- + + SaharaClusters.create_and_delete_cluster: + - + args: + flavor: + name: "m1.small" + workers_count: 1 + plugin_name: "vanilla" + hadoop_version: "2.6.0" + auto_security_group: True + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + sahara_image: + image_url: "http://sahara-files.mirantis.com/mos70/sahara-kilo-vanilla-2.6.0-ubuntu-14.04.qcow2" + username: "ubuntu" + plugin_name: "vanilla" + hadoop_version: "2.6.0" + api_versions: + sahara: + service_type: {{sahara_service_type}} + network: {} + sla: + failure_rate: + max: 0 diff --git a/rally-jobs/sahara.yaml b/rally-jobs/sahara.yaml new file mode 100644 index 0000000000..0b03cf4b51 --- /dev/null +++ b/rally-jobs/sahara.yaml @@ -0,0 +1,41 @@ +{%- set sahara_service_type = sahara_service_type|default("data-processing") %} + + SaharaNodeGroupTemplates.create_and_list_node_group_templates: + - + args: + flavor: + name: "m1.small" + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + api_versions: + sahara: + service_type: {{sahara_service_type}} + sla: + failure_rate: + max: 0 + + SaharaNodeGroupTemplates.create_delete_node_group_templates: + - + args: + flavor: + name: "m1.small" + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + api_versions: + sahara: + service_type: {{sahara_service_type}} + sla: + failure_rate: + max: 0 diff --git a/rally/consts.py b/rally/consts.py index 9fe03409d8..ec1f349a2c 100644 --- a/rally/consts.py +++ b/rally/consts.py @@ -135,6 +135,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin): S3 = "s3" DATABASE = "database" DATA_PROCESSING = "data-processing" + DATA_PROCESSING_MOS = "data_processing" OBJECT_STORE = "object-store" WORKFLOW_EXECUTION = "workflowv2" APPLICATION_CATALOG = "application_catalog" @@ -160,6 +161,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin): self.S3: _Service.S3, self.DATABASE: _Service.TROVE, self.DATA_PROCESSING: _Service.SAHARA, + self.DATA_PROCESSING_MOS: _Service.SAHARA, self.OBJECT_STORE: _Service.SWIFT, self.WORKFLOW_EXECUTION: _Service.MISTRAL, self.APPLICATION_CATALOG: _Service.MURANO, diff --git a/rally/plugins/openstack/scenarios/sahara/utils.py b/rally/plugins/openstack/scenarios/sahara/utils.py index 0a3cd5dfa9..046775d2af 100644 --- a/rally/plugins/openstack/scenarios/sahara/utils.py +++ b/rally/plugins/openstack/scenarios/sahara/utils.py @@ -58,6 +58,10 @@ CONF.register_opts(SAHARA_BENCHMARK_OPTS, group=benchmark_group) class SaharaScenario(scenario.OpenStackScenario): """Base class for Sahara scenarios with basic atomic actions.""" + # NOTE(sskripnick): Some sahara resource names are validated as hostnames. + # Since underscores are not allowed in hostnames we should not use them. + RESOURCE_NAME_FORMAT = "rally-sahara-XXXXXX-XXXXXXXXXXXXXXXX" + @atomic.action_timer("sahara.list_node_group_templates") def _list_node_group_templates(self): """Return user Node Group Templates list."""