can't create stack if resource name is chinese character

Bug #1524194 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Ethan Lynn

Bug Description

1. create a stack with a neutron port, template as:
**************************************
heat_template_version: 2016-04-08
resources:
  测试端口:
    type: OS::Neutron::Port
    properties:
      network: 3447dd80-14ef-4059-8ea6-35f4fd60ba26
**************************************

2. the stack create failed, the reason: 'ascii' codec can't decode byte 0xe6 in position 7: ordinal not in range(128) , the details:
http://paste.openstack.org/show/481274/

Also, correct the case of:
1. stack-delete with a chinese character resource name
2. 'outputs' section with a chinese character output key
......

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
description: updated
description: updated
Changed in heat:
milestone: none → mitaka-2
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Changed in heat:
assignee: huangtianhua (huangtianhua) → Ethan Lynn (ethanlynn)
Changed in heat:
assignee: Ethan Lynn (ethanlynn) → huangtianhua (huangtianhua)
Changed in heat:
assignee: huangtianhua (huangtianhua) → Ethan Lynn (ethanlynn)
Changed in heat:
milestone: mitaka-2 → mitaka-3
Changed in heat:
milestone: mitaka-3 → mitaka-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/255663
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=6cf8dc6e569842afa5f3d4a7236727f844f7ba63
Submitter: Jenkins
Branch: master

commit 6cf8dc6e569842afa5f3d4a7236727f844f7ba63
Author: Ethan Lynn <email address hidden>
Date: Wed Feb 17 16:32:51 2016 +0800

    Fix problems in unicode template support

    If we use unicode as resource name or parameter,
    we are likely to encounter unicode problems.
    This patch aims to fix unicode problems, and
    there are several things to be clear:

    1. For the class wrap with six.python_2_unicode_compatible, in
    python2 their original __str__ function will map to __unicode__,
    and new __str__ function comes from __unicode__.encode.
    So we should always return unicode in __str__() if wrap
    with python_2_unicode_compatible.

    2. python_2_unicode_compatible will not handle __repr__,
    __repr__ should return str in all versions of python.

    Co-Authored-By: Ethan Lynn <email address hidden>
    Closes-Bug: #1524194
    Change-Id: Ib4af43d153e0edf9d66308bf8e7b93a3be501d2e

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0rc1

This issue was fixed in the openstack/heat 6.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.