Error if binary file is included in plan template

Bug #1561522 reported by Nikolay Makhotkin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Valerii Kovalchuk
Liberty
Won't Fix
High
Unassigned
Mitaka
Fix Committed
High
Valerii Kovalchuk
Newton
Fix Released
High
Valerii Kovalchuk

Bug Description

Steps to reproduce:

1. Take murano package
2. Modify execution plan template:
  - include in it some binary file, e.g. archive (.zip, tar.gz)
3. Add appropriate file to Resources/scripts/
4. Deploy app

5. See error: '[exceptions.UnicodeDecodeError]: 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128)'

The error comes from method Resources.string https://github.com/openstack/murano/blob/master/murano/engine/system/agent.py#L290 and the main reason of the error - logging of result of a call to resources.string: logger doesn't support both unicode and str at a time.

Changed in murano:
status: New → Confirmed
Dmytro Dovbii (ddovbii)
Changed in murano:
assignee: nobody → Dmytro Dovbii (ddovbii)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

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

Changed in murano:
status: Confirmed → In Progress
Stan Lagun (slagun)
Changed in murano:
importance: Undecided → High
milestone: none → mitaka-rc2
Stan Lagun (slagun)
Changed in murano:
milestone: mitaka-rc3 → newton-1
Changed in murano:
milestone: newton-2 → newton-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on murano (master)

Change abandoned by Dmytro Dovbii (<email address hidden>) on branch: master
Review: https://review.openstack.org/297520

Changed in murano:
milestone: newton-3 → newton-rc1
Revision history for this message
Nikolay Starodubtsev (starodubcevna) wrote :

Today I try to reproduce this bug on current master. Looks like it was fixed some time ago.

Revision history for this message
Nikolay Starodubtsev (starodubcevna) wrote :

I tried to reproduce it with this package

Revision history for this message
Nikolay Makhotkin (nmakhotkin) wrote :

The bug still exists. I checked it just a moment ago against master from 6th of September. Please reverify that using the following packages (in attachment), try to install HAProxy based LB.

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

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

Changed in murano:
status: Confirmed → In Progress
Changed in murano:
assignee: Valerii Kovalchuk (vakovalchuk) → Kirill Zaitsev (kzaitsev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/370093
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=ce8e2ec37aefdd52a6953d9b1d55b2ce540fd2a2
Submitter: Jenkins
Branch: master

commit ce8e2ec37aefdd52a6953d9b1d55b2ce540fd2a2
Author: Valerii Kovalchuk <email address hidden>
Date: Wed Sep 14 15:18:40 2016 +0300

    Prevent logging of result of resources.string() method call

    The result of resources.string() method is the content of the file
    saved to string. Logging of binary file content causes
    UnicodeDecode error. Moreover, logging of any file content can be
    security issue. Finally, it is just not practical to fill the logs
    with tons of text from the big files.

    Change-Id: I87077b002f2a8888c22b4dfba1f7b9f0508fec69
    Closes-bug: #1561522

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

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

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

Change abandoned by Valerii Kovalchuk (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/370576

Revision history for this message
Valerii Kovalchuk (vakovalchuk) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (stable/mitaka)

Reviewed: https://review.openstack.org/370576
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=0d3178cc41921a98f4a7ec6a4d49122337836f4d
Submitter: Jenkins
Branch: stable/mitaka

commit 0d3178cc41921a98f4a7ec6a4d49122337836f4d
Author: Valerii Kovalchuk <email address hidden>
Date: Wed Sep 14 15:18:40 2016 +0300

    Prevent logging of result of resources.string() method call

    The result of resources.string() method is the content of the file
    saved to string. Logging of binary file content causes
    UnicodeDecode error. Moreover, logging of any file content can be
    security issue. Finally, it is just not practical to fill the logs
    with tons of text from the big files.

    Change-Id: I87077b002f2a8888c22b4dfba1f7b9f0508fec69
    Closes-bug: #1561522
    (cherry picked from commit ce8e2ec37aefdd52a6953d9b1d55b2ce540fd2a2)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/murano 3.0.0.0rc1

This issue was fixed in the openstack/murano 3.0.0.0rc1 release candidate.

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.