error occures when stack-create with template that includes 2-byte charset

Bug #1270761 reported by Ryo Miki
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Invalid
Medium
Qiming Teng

Bug Description

[issue]

When 2-byte charset is included in template,
error occurs with stack-create, stack-list, stack-show, etc.

[template]

devstack@heat-test-env:~/template$ cat net.template
{
  "AWSTemplateFormatVersion" : "2010-09-09",
  "Parameters": {
    "net_name" : {
      "Type" : "String"
    }
  },
  "Resources" : {
    "Net1": {
      "Type": "OS::Neutron::Net",
      "Properties": {
        "name": {"Ref": "net_name"}
      }
    }
  }
}

[represent]
# "テスト" just means "test".

devstack@heat-test-env:~/template$ heat stack-create -f net.template -P "net_name=テスト" stack1
ERROR: Remote error: UnicodeEncodeError 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
devstack@heat-test-env:~/template$ heat stack-list
ERROR: Remote error: UnicodeEncodeError 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
devstack@heat-test-env:~/template$ heat stack-show stack1
ERROR: Remote error: UnicodeEncodeError 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
devstack@heat-test-env:~/template$ heat resource-list stack1
+---------------+------------------+-----------------+----------------------+
| resource_name | resource_type | resource_status | updated_time |
+---------------+------------------+-----------------+----------------------+
| Net1 | OS::Neutron::Net | CREATE_COMPLETE | 2014-01-20T08:28:59Z |
+---------------+------------------+-----------------+----------------------+
devstack@heat-test-env:~/template$ heat resource-show stack1 Net1
ERROR: Remote error: UnicodeEncodeError 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
devstack@heat-test-env:~/template$ neutron net-list
+--------------------------------------+---------+-------------------------------------------------------+
| id | name | subnets |
+--------------------------------------+---------+-------------------------------------------------------+
| 3eadab0f-495d-4742-83e1-722de5982b38 | テスト | |
+--------------------------------------+---------+-------------------------------------------------------+

(Delete the stack to rescue this situation.)

devstack@heat-test-env:~/template$ heat stack-delete stack1
ERROR: Remote error: UnicodeEncodeError 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
devstack@heat-test-env:~/template$ heat stack-list

devstack@heat-test-env:~/template$

[similar bug report]

It cares 2-byte charset of stack and resource name.
https://bugs.launchpad.net/heat/+bug/1249234

Heat must also consider 2-byte charset of templates.

Revision history for this message
Xurong Yang (idopra) wrote :

I can reproduce this bug

Changed in heat:
assignee: nobody → Xurong Yang (idopra)
status: New → Confirmed
Revision history for this message
Ryo Miki (miki-ryo-e) wrote :

Thank you about confirming the report. I hope that this bug will be fixed in
Juno. Could you tell about the progress?

Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → Medium
assignee: Xurong Yang (idopra) → nobody
Qiming Teng (tengqim)
Changed in heat:
assignee: nobody → Qiming Teng (tengqim)
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/143915

Changed in heat:
status: Confirmed → In Progress
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

is this still an issue?

Changed in heat:
status: In Progress → Incomplete
Revision history for this message
Johannes Grassler (jgr-launchpad) wrote :

This does not appear to be a problem anymore. I just tested it with the original template on SuSE Cloud 6 (Liberty):

# heat stack-create -f net.template -P "net_name=テスト" stack1
+--------------------------------------+------------+--------------------+----------------------------+--------------+
| id | stack_name | stack_status | creation_time | updated_time |
+--------------------------------------+------------+--------------------+----------------------------+--------------+
| 1d508a87-60ec-4e7c-b226-cf478b150c6a | mynet | CREATE_COMPLETE | 2016-03-07T15:45:48.536322 | None |
| 6b3f3178-b9f0-4075-a434-be7733c8bb61 | stack1 | CREATE_IN_PROGRESS | 2016-03-08T15:08:26.590013 | None |
+--------------------------------------+------------+--------------------+----------------------------+--------------+
# heat resource-list stack1
+---------------+--------------------------------------+------------------+-----------------+----------------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time |
+---------------+--------------------------------------+------------------+-----------------+----------------------------+
| Net1 | 9961078b-60a4-412f-ba6f-df272af53752 | OS::Neutron::Net | CREATE_COMPLETE | 2016-03-08T15:08:26.810234 |
+---------------+--------------------------------------+------------------+-----------------+----------------------------+
# neutron net-list
+--------------------------------------+----------+-------------------------------------------------------+
| id | name | subnets |
+--------------------------------------+----------+-------------------------------------------------------+
| ed458ce2-ff8c-4ad6-9e74-0a1e69b53b54 | floating | da6667dc-2d6d-4933-b270-7620a36431ba 192.168.232.0/24 |
| 60b1a121-36a9-4a6d-87e6-1242fd54ae1b | justnet | |
| 747dfbb3-76c8-4069-8d99-dd494e106d24 | fixed | a9fed2fd-3082-4cab-a47d-a2336d22d5a3 192.168.123.0/24 |
| 9961078b-60a4-412f-ba6f-df272af53752 | テスト | |
+--------------------------------------+----------+-------------------------------------------------------+

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Qiming Teng (<email address hidden>) on branch: master
Review: https://review.openstack.org/143915

Thomas Herve (therve)
Changed in heat:
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.