Internal errors happen if passing malformed body to attach_interface API

Bug #1283909 reported by Ken'ichi Ohmichi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Ken'ichi Ohmichi

Bug Description

"Attach an interface to an instance" v2 API does not validate whether necessary attribute is specified or not.
The lack causes internal errors now.

Tags: api
Changed in nova:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
Tracy Jones (tjones-i)
tags: added: api
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Jaspreet (walia-jaspreet) wrote :

I can confirm that I have encountered same issue .

When following create interface api is called with empty body , http Error code 500 is returned making it difficult for end-user to debug the issue.

Example:
--------------
https://example.com:2020/v2/0371a910e818429f88498857276d8a0a/
servers/f5144641-2671-491b-91f6-2318537a2cf5/os-interface

Request Body
{
  "interfaceAttachment": {}
}

Response
{
    "computeFault": {
        "message": "The server has either erred or is incapable of performing the requested operation.",
        "code": 500
    }
}

This is not useful to end-user and doesn't tell user what the parameters are missing. Ideally it should throw 400 Error code.

Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

I don't think this is an issue anymore? It appears some other internal fixes have also fixed this bug too

Changed in nova:
status: Confirmed → Fix Committed
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.2
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.