Ceilometer scenario doesn't require "ceilometer" ctx

Bug #1557642 reported by Eugeniya Kudryashova on 2016-03-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Roman Vasilets

Bug Description

Several ceilometer sceanrios don't require ceilometer context, but try to use resources of it. When user doesn't specify "ceilometer" context in task, such scenarios will fail with KeyError

Rally version: 0.3.1
Input task:

  "kw": {
    "runner": {
      "type": "constant",
      "concurrency": 1,
      "times": 10
    "sla": {
      "failure_rate": {
        "max": 0
    "context": {
      "users": {
        "users_per_tenant": 2,
        "tenants": 2
  "name": "CeilometerMeters.list_meters",
  "pos": 0


 KeyError', u"'resources'", u'Traceback (most recent call last):\n File "/usr/local/lib/python2.7/dist-packages/rally/task/runner.py", line 66, in _run_scenario_once\n deprecated_output = getattr(scenario_inst, method_name)(**kwargs)\n File "/usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/scenarios/ceilometer/resources.py", line 43, in list_resources\n self.list_matched_resources(filter_by_resource_id=True)\n File "/usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/scenarios/ceilometer/resources.py", line 98, in list_matched_resources\n metadata_query)\n File "/usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/scenarios/ceilometer/utils.py", line 124, in _make_general_query\n resource_id = self.context["tenant"]["resources"][0]\nKeyError: \'resources\'\n'], u'duration': 0.8557090759277344, u'output': {u'additive': [], u'complete': []}, u'idle_duration': 0, u'atomic_actions': {u'ceilometer.list_resources:project_id': 0.7313339710235596, u'ceilometer.list_resources:user_id': 0.12360095977783203}}]}

Changed in rally:
status: New → Triaged
importance: Undecided → Medium
summary: - Ceilometer scenario failed with KeyError 'resources'
+ Ceilometer scenario doesn't require "ceilometer" ctx
description: updated
Changed in rally:
assignee: nobody → Roman Vasilets (rvasilets)

Fix proposed to branch: master
Review: https://review.openstack.org/323512

Changed in rally:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/323512
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=20b6571029a48928c9b25f027e3e21fd5adf8b23
Submitter: Jenkins
Branch: master

commit 20b6571029a48928c9b25f027e3e21fd5adf8b23
Author: Roman Vasilets <email address hidden>
Date: Tue May 31 20:40:54 2016 +0300

    Fix ceilometer bug with required contexts

    Add ceilometer required context where its needed.

    Change-Id: I7581a55535e6a27451c73ee177ead8f660a12321
    Closes-bug: #1557642

Changed in rally:
status: In Progress → Fix Released

Change abandoned by Roman Vasilets (<email address hidden>) on branch: master
Review: https://review.openstack.org/300429

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers