breaks get_file under python3: bytes objects are serialized as integer arrays

Bug #1498037 reported by Marco M
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Invalid
Undecided
Unassigned
oslo.serialization
Incomplete
Undecided
Unassigned
python-heatclient
Triaged
High
Sirushti Murugesan

Bug Description

Not sure if this should be reported under heatclient or oslo.serialization:

    heat_template_version: 2014-10-16
    resources:
      xyz:
        type: "OS::Heat::SoftwareConfig"
        properties:
          group: script
          config:
            get_file: myscript.sh

The result is

    DEBUG (session) REQ: curl -g -i -X POST ...... "files": {"file:///path/to/myscript.sh": [35, 33, 47, 98, 105...

Therefore, an exception is raised

  heatclient.exc.HTTPBadRequest: ERROR: Property error : xyz: config Value must be a string

Changed in heat:
status: New → Invalid
Changed in python-heatclient:
status: New → Triaged
importance: Undecided → High
Changed in python-heatclient:
assignee: nobody → Sirushti Murugesan (sirushtim)
summary: - breaks get_file under ptyhon3: bytes objects are serialized as integer
+ breaks get_file under python3: bytes objects are serialized as integer
arrays
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

What's the code path in oslo.serialization for this heat python client command line? in other words, which oslo.serialization API is causing this issue?

Changed in oslo.serialization:
status: New → Incomplete
Revision history for this message
Marco M (mmawaw) wrote :

(Pdb) dumps(b'foo')
[102, 111, 111]
'[102, 111, 111]'

Revision history for this message
Rob Coward (rcoward) wrote :

This bugs is almost a year old - is there any chance of progressing it ? It's crippling my ability to use the HEAT client on windows.

Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32

> heat --version
1.3.0

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.