Fix errors for create_endpoints in version2

Bug #1250765 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
huangtianhua

Bug Description

1. Create an endpoint without 'service_id' has thrown a 500 Internal Server Error.It should return a 400 Bad Request with appropriate message.
2. Invalid urls should be discarded in response body.

Changed in keystone:
assignee: nobody → huangtianhua (huangtianhua)
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/56176

Changed in keystone:
status: New → In Progress
Revision history for this message
Lance Bragstad (lbragstad) wrote :

Could you list the steps you took to get the 500 error? I've tried passing an invalid service id and no service id, but I'm not getting the 500 error.

Revision history for this message
Dolph Mathews (dolph) wrote :

Reproduced:

POST http://localhost:35357/v2.0/endpoints

Content-Type: application/json
X-Auth-Token: ADMIN

{
  "endpoint": {
    "publicurl": "asdf"
  }
}

500 Internal Server Error
Date: Fri, 22 Nov 2013 16:07:14 GMT
Vary: X-Auth-Token
Content-Length: 156
Status: 500
Content-Type: application/json

{
  "error": {
    "message": "An unexpected error prevented the server from fulfilling your request. 'service_id'",
    "code": 500,
    "title": "Internal Server Error"
  }
}

Revision history for this message
Dolph Mathews (dolph) wrote :

I also tested this against v3, and a 400 is returned, as expected.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to keystone (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/57979

Changed in keystone:
assignee: huangtianhua (huangtianhua) → Dolph Mathews (dolph)
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
assignee: Dolph Mathews (dolph) → huangtianhua (huangtianhua)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to keystone (master)

Reviewed: https://review.openstack.org/57979
Committed: http://github.com/openstack/keystone/commit/e3b67d9129f41838943a34c26886863483d414f4
Submitter: Jenkins
Branch: master

commit e3b67d9129f41838943a34c26886863483d414f4
Author: Dolph Mathews <email address hidden>
Date: Fri Nov 22 10:58:05 2013 -0600

    refactor test_catalog

    - Tests for "missing" attributes are actually testing with null values,
      not missing keys.
    - Not being able to explicitly provide alternative URLs resulting in
      hacky workarounds that can be avoiding by simply exposing kwargs with
      reasonable defaults
    - Several tests redundantly asserted the expected response status, which
      is already handled by the test framework

    Change-Id: Icadb4927bcf03ca7e79fef1507e419a4932f32a9
    Related-Bug: 1250765

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

Reviewed: https://review.openstack.org/56176
Committed: http://github.com/openstack/keystone/commit/dbd98a4c857411bf33184332724270c980c99f36
Submitter: Jenkins
Branch: master

commit dbd98a4c857411bf33184332724270c980c99f36
Author: huangtianhua <email address hidden>
Date: Wed Nov 13 18:05:22 2013 +0800

    Fix errors for create_endpoint api in version2

    1. Create an endpoint without 'service_id' should return a 400 Bad Request
    with appropriate message instead of 500 Internal Server Error.
    2. Empty urls should be discarded.

    Change-Id: I535467ec35fe2ae738ecae0a4f20d19ff4f001ec
    Closes-Bug: #1250765

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