List Queue with detaild=True -Truncated JSON response

Bug #1192196 reported by Malini Kamalambal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
High
Flavio Percoco

Bug Description

List Queue with detailed=True
UPDATE: The response gets truncated on claim messages as well.

System Test : marconi.tests.system.queue.test_queue.TestQueue.test_019_queue_list_detailed
(nosetests -v test_queue:TestQueue.test_019_queue_list_detailed)
Expected Result:
Server will always return a valid JSON

Actual Result:
Server returns a malformed (truncated) JSON. See below

http://paste.openstack.org/raw/38850/

{"queues": [{"href": "/v1/1/queues/145501ff552f7cd6869faae558f37354ed47c69fa072bf270e3d3132bcc8bbeffcf9e1cdee78909f97448984001ed15613d7bfa50568454d3618bbff6971fec25a", "name": "145501ff552f7cd6869faae558f37354ed47c69fa072bf270e3d3132bcc8bbeffcf9e1cdee78909f97448984001ed15613d7bfa50568454d3618bbff6971fec25a", "metadata": {"message": "Longer than allowed queue name"}}, {"href": "/v1/1/queues/225b35674006f6ad31e8fcb234034e318fb9bdb15cfd1cc6f6c078ca39c8f262ecec36ecf12d99bd82ddf4f7079ac0d5d2c20545c9b772ea26772986affb873d1a", "name": "225b35674006f6ad31e8fcb234034e318fb9bdb15cfd1cc6f6c078ca39c8f262ecec36ecf12d99bd82ddf4f7079ac0d5d2c20545c9b772ea26772986affb873d1a", "metadata": {"message": "Longer than allowed queue name"}}, {"href": "/v1/1/queues/2572523528df43451c33ec4fd65b086095856c944a7de6f1e16cd6fb88126a4e348a05438a298792192394be16b7fb56117a6640d7f68eed3bdfb96a4e69278f81", "name": "2572523528df43451c33ec4fd65b086095856c944a7de6f1e16cd6fb88126a4e348a05438a298792192394be16b7fb56117a6640d7f68eed3bdfb96a4e69278f81", "metadata": {"message": "Longer than allowed queue name"}}, {"href": "/v1/1/queues/3d48c4d0db9253331dbd1056ab9cfc38217cc8dd480d6bebd6afa59799bfb795d8e7b8add1c7b854b27d2452d6caf70a633957e7d7f01b209fd4876a8608298e61", "name": "3d48c4d0db9253331dbd1056ab9cfc38217cc8dd480d6bebd6afa59799bfb795d8e7b8add1c7b854b27d2452d6caf70a633957e7d7f01b209fd4876a8608298e61", "metadata": {"message": "Longer than allowed queue name"}}, {"href": "/v1/1/queues/QteStquEue", "name": "QteStquEue", "metadata": {"messages": "Orange"}}, {"href": "/v1/1/queues/darngoodque", "name": "darngoodque", "metadata": {"grace": 300, "ttl": 300}}, {"href": "/v1/1/queues/darngoodqueue", "name": "darngoodqueue", "metadata": {"grace": 300, "ttl": 300}}, {"href": "/v1/1/queues/invalidauthtoken", "name": "invalidauthtoken", "metadata": {"messages": "invalid auth token"}}, {"href": "/v1/1/queues/missingheader", "name": "missingheader", "metadata": {"messages": "USER_AGENT header is missing"}}, {"href": "/v1/1/queues/nonASCIImetadata", "name": "nonASCIImetadata", "metadata": {"汉字": "non ASCII metadata"}}], "links": [{"href": "/v1/1/queues?detailed=true&marker=nonASCIImetadata", "rel": "next

description: updated
description: updated
description: updated
Revision history for this message
Amit Gandhi (amit-gandhi) wrote :

Repro idea: What happens when a connection is dropped/closed before the entire response body has been read by the client?

Changed in marconi:
importance: Undecided → High
Kurt Griffiths (kgriffs)
Changed in marconi:
assignee: nobody → Flavio Percoco (flaper87)
status: New → In Progress
Revision history for this message
Flavio Percoco (flaper87) wrote :

I can reproduce this bug using httpie but I haven't figured out what's happening yet.

(.venv)phantom (master*) marconi/tests/system $ http -v GET http://127.0.0.1:8888/v1/queues\?detailed\=true\&marker\=c9aea2e0a658330a115c58ead72b2e034e88092be8d309f11270bb2f26f6fe5b26a0d185ac02b766ab8ef914da1bedb3618233bb05bc5152c2bbbce6dfce0e942c X-Project-Id:123456
GET /v1/queues?detailed=true&marker=c9aea2e0a658330a115c58ead72b2e034e88092be8d309f11270bb2f26f6fe5b26a0d185ac02b766ab8ef914da1bedb3618233bb05bc5152c2bbbce6dfce0e942c HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Content-Length: 0
Host: 127.0.0.1:8888
User-Agent: HTTPie/0.4.1
X-Project-Id: 123456

HTTP/1.0 200 OK
Content-Length: 2190
Content-Location: /v1/queues?detailed=true&marker=c9aea2e0a658330a115c58ead72b2e034e88092be8d309f11270bb2f26f6fe5b26a0d185ac02b766ab8ef914da1bedb3618233bb05bc5152c2bbbce6dfce0e942c
Content-Type: application/json; charset=utf-8
Date: Thu, 18 Jul 2013 13:37:37 GMT
Server: WSGIServer/0.1 Python/2.7.4

{"queues": [{"href": "/v1/queues/cc3d9e32f0a14010638d5d3270ce2c42563b3ef937573f9c3e1e37b518de2aab08501fa8938f7341b3c758085934ccc2b6ad98c1ccc3f7f18c625072fdb67551ae", "name": "cc3d9e32f0a14010638d5d3270ce2c42563b3ef937573f9c3e1e37b518de2aab08501fa8938f7341b3c758085934ccc2b6ad98c1ccc3f7f18c625072fdb67551ae", "metadata": {"queue": "Longer than allowed queue name"}}, {"href": "/v1/queues/ce9004d2c3a8c7966009c604cab39ca70df835dba4200d970c9474850195dad80b0d051275ec17aa3d002e7bac40e23ce577bd740ea117098c6c3ead1fd5a56e0d", "name": "ce9004d2c3a8c7966009c604cab39ca70df835dba4200d970c9474850195dad80b0d051275ec17aa3d002e7bac40e23ce577bd740ea117098c6c3ead1fd5a56e0d", "metadata": {"queue": "Longer than allowed queue name"}}, {"href": "/v1/queues/d0d9fbaa86b37ca197eaf6dc3daaad02a697416b0f1085ce59bf8b2903e12efe36572e321aaaf557e7b447d995f2eb0509422daab17526bf5308a9d3639db0d3b3", "name": "d0d9fbaa86b37ca197eaf6dc3daaad02a697416b0f1085ce59bf8b2903e12efe36572e321aaaf557e7b447d995f2eb0509422daab17526bf5308a9d3639db0d3b3", "metadata": {"queue": "Longer than allowed queue name"}}, {"href": "/v1/queues/fc22653dba99592b9edacdc12d8960d897376d10afadef0e6edb3182e6c9e87b23e60ab88078dc972c744dfdb7a33a3539d5d8bb53c05eca2accdaa780af25c7c7", "name": "fc22653dba99592b9edacdc12d8960d897376d10afadef0e6edb3182e6c9e87b23e60ab88078dc972c744dfdb7a33a3539d5d8bb53c05eca2accdaa780af25c7c7", "metadata": {"queue": "Longer than allowed queue name"}}, {"href": "/v1/queues/fe5095ac8dad8dfff7feef5b4e78a18c18e184b49755ed76728262a9c50c5552d196374b9e73cb91372bf95ec3de4ea993b7bf7d046a00cb4fde7d2ce6c4b19f86", "name": "fe5095ac8dad8dfff7feef5b4e78a18c18e184b49755ed76728262a9c50c5552d196374b9e73cb91372bf95ec3de4ea993b7bf7d046a00cb4fde7d2ce6c4b19f86", "metadata": {"queue": "Longer than allowed queue name"}}, {"href": "/v1/queues/nonASCIImetadata", "name": "nonASCIImetadata", "metadata": {"汉字": "non ASCII metadata"}}, {"href": "/v1/queues/plaintextheader", "name": "plaintextheader", "metadata": {"queue": "text/plain in header"}}, {"href": "/v1/queues/toplevel", "name": "toplevel", "metadata": {"_queue": "Top Level field with _"}}], "links": [{"href": "/v1/queues?marker=toplevel&detailed=true", "rel": "next

Revision history for this message
Malini Kamalambal (malini-pk) wrote :

Verified fixed with falcon 0.1.6.post3

Changed in marconi:
status: In Progress → Fix Committed
Changed in marconi:
milestone: none → havana-3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers