apiclient exceptions make assumptions about dict ordering

Bug #1277565 reported by Ben Nemec
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
Medium
Stanislaw Pitucha

Bug Description

Some code in the apiclient exceptions module uses numerical indices to retrieve a value from a dict. This is bad because there is no guarantee that the elements of a dict will be returned in the same order every time. Someone needs to take a look at the dict we're working with and figure out the correct key to retrieve and drop the index notation.

See related review: https://review.openstack.org/#/c/71577

Ben Nemec (bnemec)
Changed in oslo:
importance: Undecided → Low
Changed in oslo:
status: New → Triaged
Revision history for this message
Ben Nemec (bnemec) wrote :

Bumping the priority on this since it was just reported again, so it appears to be a problem people are hitting now.

Changed in oslo:
importance: Low → Medium
Changed in oslo:
assignee: nobody → Stanislaw Pitucha (stanislaw-pitucha)
status: Triaged → In Progress
Revision history for this message
Ben Nemec (bnemec) wrote :

Proposed fix for this bug: https://review.openstack.org/112364

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/112364
Committed: https://git.openstack.org/cgit/openstack/oslo-incubator/commit/?id=4ef01931d5e8207133ef25150ef800430d5e91d1
Submitter: Jenkins
Branch: master

commit 4ef01931d5e8207133ef25150ef800430d5e91d1
Author: Stanislaw Pitucha <email address hidden>
Date: Wed Aug 6 18:19:58 2014 +0100

    Handle non-openstack errors gracefully

    The http error is not guaranteed to come directly from an OpenStack
    service. Even if it does, it may not conform to the usual structure.
    That kind of response should be handled properly anyway.

    Change-Id: Ibd4c678d068ca10a53a72520f7eeffcc84133f07
    Closes-bug: 1277565

Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo-incubator:
milestone: none → juno-3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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