Invalid ec2 credentials result in a key error + 400 Bad Request

Bug #922373 reported by Adam Gandelman on 2012-01-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Vish Ishaya

Bug Description

Using incorrect EC2 credentials in an API request results in a KeyError + trace in nova-api.log and a 400 returned to the client:

2012-01-26 18:58:30,196 INFO nova.api [req-e6bca891-9752-460e-83d1-d1c164957bb1 90bbd32c7ed54e5f84c98d2778a846f0 d2876293139c4fdd835044cf0a591917] 0.407539s POST /services/Cloud/ CloudController:DescribeInstances 200 [Boto/2.0 (linux2)] application/x-www-form-urlencoded text/xml
2012-01-26 18:58:34,166 ERROR nova.api [-] 'access'
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/api/ec2/", line 209, in __call__
(nova.api): TRACE: token_id = result['access']['token']['id']
(nova.api): TRACE: KeyError: 'access'
(nova.api): TRACE:
2012-01-26 18:58:34,167 INFO nova.api [-] 0.18230s POST /services/Cloud/ None:None 400 [Boto/2.0 (linux2)] application/x-www-form-urlencoded text/plain

Fix proposed to branch: master

Changed in nova:
assignee: nobody → Adam Gandelman (gandelman-a)
status: New → In Progress

Fix proposed to branch: master

Changed in nova:
assignee: Adam Gandelman (gandelman-a) → Vish Ishaya (vishvananda)

Submitter: Jenkins
Branch: master

commit 13b82dbbcfe280eda15fd9248a494cb8ce4e5056
Author: Vishvananda Ishaya <email address hidden>
Date: Mon Feb 6 16:29:30 2012 -0800

    Optimizes ec2 keystone usage and handles errors

     * breaks out gen_request_id so we can return it in error msg
     * breaks out ec2_error so we can use it in multiple middlewares
     * adds new middleware (remove old after devstack change)
     * skips extra call to keystone for second authentication
     * fixes bug 922373

    Change-Id: If765d149289255b0bf0e0c1b647ebb547ce5759b

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-02-29
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers