benchmark util 'get_from_manager' improperly handles http response codes

Bug #1457882 reported by Valeriy Ponomaryov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Medium
Valeriy Ponomaryov

Bug Description

Any operation "wait_for_delete" expects that exception with http code "404" will be raised.

Different python clients return this code with different names of attribute - either "code" or "http_status".

But function "rally/benchmark/utils.py:get_from_manager" does not expect the latter case and raises general exception "exceptions.GetResourceFailure" instead of expected "exceptions.GetResourceNotFound".

It was found with implementation of Manila project benchmarks.

Changed in rally:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rally (master)

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

Changed in rally:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally (master)

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

commit a5fbbe88ddf195f3273cff4a8c85f8b83877a16d
Author: Valeriy Ponomaryov <email address hidden>
Date: Fri May 22 16:17:45 2015 +0300

    Handle http response code 404 properly

    Any operation "wait_for_delete" expects that exception with http code "404"
    will be raised.
    Different python clients return this code with different names of attribute -
    either "code" or "http_status".
    But function "rally/benchmark/utils.py:get_from_manager" does not expect
    the latter case and raises general exception "exceptions.GetResourceFailure"
    instead of expected "exceptions.GetResourceNotFound".
    So, fix mentioned function and related unit test that was asserting
    wrong thing.

    Change-Id: I0430ed8a3e9308e8f4a245b4c68e8d7f1f0bd02d
    Closes-Bug: #1457882

Changed in rally:
status: In Progress → Fix Committed
Changed in rally:
milestone: none → 0.0.5
Changed in rally:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.