create_service() returns 500 Internal Server Error when bad keyword arg (XML only)

Bug #1061738 reported by Jay Pipes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
gordon chung

Bug Description

======================================================================
ERROR: GET Service
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/identity/admin/test_services.py", line 62, in test_create_get_delete_service
    resp, _ = self.client.delete_service(service_data['id'])
UnboundLocalError: local variable 'service_data' referenced before assignment
-------------------- >> begin captured logging << --------------------
tempest.common.rest_client: ERROR: Request URL: http://127.0.0.1:35357/v2.0/OS-KSADM/services
tempest.common.rest_client: ERROR: Request Body: <?xml version="1.0" encoding="UTF-8"?>
<service xmlns="http://docs.openstack.org/identity/api/ext/OS-KSADM/v1.0" type="type--9743" description="description-769556" name="service-722762"/>
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Thu, 04 Oct 2012 16:42:05 GMT', 'vary': 'X-Auth-Token', 'content-length': '284', 'status': '500', 'content-type': 'application/xml'}
tempest.common.rest_client: ERROR: Response Body: {'message': "An unexpected error prevented the server from fulfilling your request. create_service() got an unexpected keyword argument 'service'", 'code': '500', 'title': 'Internal Server Error'}

Keystone should return a 400 Bad Request if there are invalid arguments/query params supplied to OS-KSADM/ requests, not a 500.

Tags: admin xml
Revision history for this message
Jay Pipes (jaypipes) wrote :

Important: This is ONLY seen in the XML format. JSON format works fine.

summary: create_service() returns 500 Internal Server Error when bad keyword arg
+ (XML only)
tags: added: admin xml
Joseph Heck (heckj)
Changed in keystone:
status: New → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
assignee: nobody → gordon chung (chungg)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/21339
Committed: http://github.com/openstack/keystone/commit/5342209a3dc0bf4e41cab87b894954526edcbffd
Submitter: Jenkins
Branch: master

commit 5342209a3dc0bf4e41cab87b894954526edcbffd
Author: Gordon Chung <email address hidden>
Date: Wed Feb 6 12:34:06 2013 -0500

    return 400 Bad Request if invalid params supplied (bug1061738)

    return a 400 Bad Request if there are invalid arguments params supplied

    Change-Id: I82da8a6db4a2847c8407cd0917b2d71ac9f9ba7a

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: grizzly-3 → 2013.1
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.