Freezer api fails to encode return objects as json

Bug #1593212 reported by Memo Garcia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Backup/Restore and DR (Freezer)
Fix Released
High
Domhnall Walsh
Liberty
Fix Committed
Undecided
Domhnall Walsh
Mitaka
Fix Committed
Undecided
Domhnall Walsh

Bug Description

when a GET requests gets made to the api, it fails to respond saying:

"dict" object has no attribute 'encode'

so basically falcon is being supplied with a dict rather than a string for the response body,

a solution could be to wrap the response in a json format.

Changed in freezer:
assignee: nobody → Domhnall Walsh (domhnall-walsh)
Revision history for this message
Domhnall Walsh (domhnall-walsh) wrote :

This affects the stable/mitaka branch, and most likely the stable/liberty branch, but *not* master.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to freezer-api (stable/mitaka)

Related fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/331237

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on freezer-api (stable/mitaka)

Change abandoned by Domhnall Walsh (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/331237
Reason: Cannot change the requirement for falcon, adopting a different approach.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to freezer-api (master)

Fix proposed to branch: master
Review: https://review.openstack.org/334920

Changed in freezer:
status: New → In Progress
Revision history for this message
Domhnall Walsh (domhnall-walsh) wrote :

This problem showed up on the stable/mitaka branch but is actually an issue with the invocation of middleware and how that varies between version of Falcon. On master, the approach used is the "modern" one for falcon >= 0.2.0b1, whereas on stable/mitaka (and stable/liberty) it's the older approach, which are incompatible with one another.

Changed in freezer:
importance: Undecided → High
milestone: none → newton-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer-api (master)

Reviewed: https://review.openstack.org/334920
Committed: https://git.openstack.org/cgit/openstack/freezer-api/commit/?id=a28be0565954518fe12a3513963e7cecce6dc67b
Submitter: Jenkins
Branch: master

commit a28be0565954518fe12a3513963e7cecce6dc67b
Author: Domhnall Walsh <email address hidden>
Date: Tue Jun 28 11:40:59 2016 +0100

    Fix Middleware loading for falcon >= 0.1.6

    API now loads middleware correctly for all version of falcon
    specified in requirements.txt.

    Change-Id: I337cff087b7b34e760e0555591e1929979450c39
    Closes-Bug: #1593212

Changed in freezer:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to freezer-api (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/337230

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer-api (stable/mitaka)

Reviewed: https://review.openstack.org/337230
Committed: https://git.openstack.org/cgit/openstack/freezer-api/commit/?id=40862a1daf7b1af18c22556bce86450e3116f039
Submitter: Jenkins
Branch: stable/mitaka

commit 40862a1daf7b1af18c22556bce86450e3116f039
Author: Domhnall Walsh <email address hidden>
Date: Tue Jun 28 11:40:59 2016 +0100

    Fix Middleware loading for falcon >= 0.1.6

    API now loads middleware correctly for all version of falcon
    specified in requirements.txt.

    Closes-Bug: #1593212

    Conflicts:
     freezer_api/api/common/middleware.py
     freezer_api/api/common/utils.py
     freezer_api/cmd/api.py
     freezer_api/service.py

    Change-Id: I9b82304cd937598a2d513e2bca709569e20a4f83

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer-api (stable/liberty)

Reviewed: https://review.openstack.org/337626
Committed: https://git.openstack.org/cgit/openstack/freezer-api/commit/?id=0c6de9b7fd0968e2bd9a27184c837f8158014efd
Submitter: Jenkins
Branch: stable/liberty

commit 0c6de9b7fd0968e2bd9a27184c837f8158014efd
Author: Domhnall Walsh <email address hidden>
Date: Tue Jun 28 11:40:59 2016 +0100

    Fix Middleware loading for falcon >= 0.1.6

    API now loads middleware correctly for all version of falcon
    specified in requirements.txt.

    Cherry-pick from https://review.openstack.org/#/c/334920/
    and pre_test_hook.sh from https://review.openstack.org/#/c/319950/

    Conflicts:
     freezer_api/api/common/middleware.py
     freezer_api/api/common/utils.py
     freezer_api/cmd/api.py
     freezer_api/service.py

    Change-Id: I337cff087b7b34e760e0555591e1929979450c39
    Closes-Bug: #1593212

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/freezer-api 3.0.0.0b2

This issue was fixed in the openstack/freezer-api 3.0.0.0b2 development milestone.

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.