identical API calls returning different formatted responses

Bug #1626734 reported by Jason
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Undecided
Unassigned
2.0
Invalid
Undecided
Unassigned

Bug Description

When accessing /api/2.0/machines/{system_id}/ I am sometimes receiving a JSON object as a return and am sometimes receiving a pickle object as a return.

http://maas1.lab/MAAS/api/2.0/machines/4y3h7q/

Returned Pickle object: http://paste.ubuntu.com/23217500/

This happened on MAAS Version 2.0.0+bzr5189-0ubuntu1 (16.04.1)

Revision history for this message
Jason (jwitko1) wrote :
Revision history for this message
Blake Rouse (blake-rouse) wrote :

What are you going to make the request? Using curl? If so you should specify an Accept header for application/json.

Revision history for this message
Christian Reis (kiko) wrote :

Good point. However, should we ever return pickles?

Revision history for this message
Jason (jwitko1) wrote :

@blake

Thanks for the quick response. I am using the python requests module to generate the request. I was not specifying the Accept header for "application/json", I will specify that explicity and see if it happens again.

Changed in maas:
status: New → Incomplete
Revision history for this message
Jason (jwitko1) wrote :

Specifying Accept header for application/json looks to have fixed the issue. Thank you! I will open a new bug should it happen again.

Changed in maas:
status: Incomplete → Invalid
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.