rally-openstack/rally-jobs/rally-mistral.yaml
Andrey Kurilin dbdb175270 [cleanup] Fix identifiers for Mistral resources
Rally cleanup supports 3 Mistral resources: workbooks, workflows and
executions.

The min version of supported python-mistralclient (3.1.0 from our
requirements.txt) represents all these resources via special classes
[1][2][3] which have one parent class [4].

Issues with current rally cleanup code:

- Despite the fact that raw mistral objects do not support __getitem__
  method, `id` and `name` fields are tried to be accessed in such way,
  which made cleanup those resources broken for a long time (from the
  beggining?!)
- Mistral executions do not have own name, which we can use for
  filtering, but it stores workflow name, even if it was removed.
  Workflow name can be and should be used as an identifier.

Why these issues were not detected before:

- The Rally task which we used in CI has `do_delete=true` option for all
  workloads which makes workload to delete resources by itself without
  waiting for global cleanup.

  The fix is provided in this patch

- Despite the fact that osresources includes mistral resources to check
  that nothing is left after task execution, it doesn't help since there
  is no `all-tenants` option which turns listing resources from admin
  tenant to listing all existing resources.

  Cannot be fixed via our code.

[1] https://github.com/openstack/python-mistralclient/blob/3.1.0/mistralclient/api/v2/workbooks.py#L20
[2] https://github.com/openstack/python-mistralclient/blob/3.1.0/mistralclient/api/v2/workflows.py#L25
[3] https://github.com/openstack/python-mistralclient/blob/3.1.0/mistralclient/api/v2/executions.py#L27
[4] https://github.com/openstack/python-mistralclient/blob/3.1.0/mistralclient/api/base.py#L19

Change-Id: I57fa05ff26aa0836224ba7a3393833ba31fe58dd
2018-01-24 15:12:43 +02:00

98 lines
2.8 KiB
YAML

---
version: 2
title: Task for gate-rally-dsvm-mistral-rally-ubuntu-xenial-nv job
description: >
This task contains various subtasks for testing mistral plugins
subtasks:
-
title: MistralWorkbooks.list_workbooks tests
scenario:
MistralWorkbooks.list_workbooks: {}
runner:
constant:
times: 50
concurrency: 10
contexts:
users:
tenants: 1
users_per_tenant: 1
-
title: MistralWorkbooks.create_workbook tests
workloads:
-
scenario:
MistralWorkbooks.create_workbook:
definition: "~/.rally/extra/mistral_wb.yaml"
runner:
constant:
times: 50
concurrency: 10
contexts:
users:
tenants: 1
users_per_tenant: 1
-
scenario:
MistralWorkbooks.create_workbook:
definition: "~/.rally/extra/mistral_wb.yaml"
do_delete: true
runner:
constant:
times: 50
concurrency: 10
contexts:
users:
tenants: 1
users_per_tenant: 1
-
title: MistralExecutions.list_executions tests
scenario:
MistralExecutions.list_executions: {}
runner:
constant:
times: 50
concurrency: 10
contexts:
users:
tenants: 2
users_per_tenant: 2
-
title: MistralExecutions.create_execution_from_workbook tests
workloads:
-
description: MistralExecutions.create_execution_from_workbook scenario\
with delete option
scenario:
MistralExecutions.create_execution_from_workbook:
definition: "~/.rally/extra/mistral_wb.yaml"
workflow_name: "wf1"
params: "~/.rally/extra/mistral_params.json"
wf_input: "~/.rally/extra/mistral_input.json"
do_delete: true
runner:
constant:
times: 50
concurrency: 10
contexts:
users:
tenants: 2
users_per_tenant: 2
-
description: MistralExecutions.create_execution_from_workbook scenario\
without delete option
scenario:
MistralExecutions.create_execution_from_workbook:
definition: "~/.rally/extra/mistral_wb.yaml"
workflow_name: "wf1"
params: "~/.rally/extra/mistral_params.json"
wf_input: "~/.rally/extra/mistral_input.json"
do_delete: false
runner:
constant:
times: 50
concurrency: 10
contexts:
users:
tenants: 2
users_per_tenant: 2