yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #47108
[Bug 1551689] [NEW] Adding member in a list causes 500
Public bug reported:
Overview:
One of the responses that wsgi returns reports: "Unexpected body type. Expected list/dict." I then tried supplying the new member as a list for it to fail.
How to reproduce:
The command:
nib@VM:~/devstack/devstack$ curl -H "X-Auth-Token: $token" -X POST http://127.0.0.1:9292/v2/images/a394fe2a-bc8b-4485-9819-e264d278e45f/members -d '["f9544674f852450faf5b595a38f4e98f"]'
<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>
<h1>500 Internal Server Error</h1>
The server has either erred or is incapable of performing the requested operation.<br /><br />
Partial stack trace:
2016-03-01 11:35:07.189 TRACE glance.common.wsgi File "/opt/stack/glance/glance/api/v2/image_members.py", line 249, in create
2016-03-01 11:35:07.189 TRACE glance.common.wsgi member_id = body['member']
2016-03-01 11:35:07.189 TRACE glance.common.wsgi TypeError: list indices must be integers, not str
Output:
500
Expected:
400
** Affects: glance
Importance: Undecided
Assignee: Niall Bunting (niall-bunting)
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1551689
Title:
Adding member in a list causes 500
Status in Glance:
New
Bug description:
Overview:
One of the responses that wsgi returns reports: "Unexpected body type. Expected list/dict." I then tried supplying the new member as a list for it to fail.
How to reproduce:
The command:
nib@VM:~/devstack/devstack$ curl -H "X-Auth-Token: $token" -X POST http://127.0.0.1:9292/v2/images/a394fe2a-bc8b-4485-9819-e264d278e45f/members -d '["f9544674f852450faf5b595a38f4e98f"]'
<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>
<h1>500 Internal Server Error</h1>
The server has either erred or is incapable of performing the requested operation.<br /><br />
Partial stack trace:
2016-03-01 11:35:07.189 TRACE glance.common.wsgi File "/opt/stack/glance/glance/api/v2/image_members.py", line 249, in create
2016-03-01 11:35:07.189 TRACE glance.common.wsgi member_id = body['member']
2016-03-01 11:35:07.189 TRACE glance.common.wsgi TypeError: list indices must be integers, not str
Output:
500
Expected:
400
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1551689/+subscriptions
Follow ups