Russian characters in a SoftwareConfig cause the stack to fail

Bug #1599294 reported by Steve Barbieri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
huangtianhua

Bug Description

I am using a standalone Kilo heat engine. I have this simple template that writes data to a file. The data contains Russian characters.

heat_template_version: 2013-05-23

description: >
  Simple template

resources:
  server:
    type: OS::Nova::Server
    properties:
      user_data: {get_resource: server_mime}
      user_data_format: RAW
      name: "my-instance"
      image: "some_image_id"
      flavor: m1.medium
      key_name: my_key
      availability_zone: nova

  server_mime:
    type: OS::Heat::MultipartMime
    properties:
      parts:
        - config: { get_resource: test_config }
          subtype: "x-shellscript"

  test_config:
    type: OS::Heat::SoftwareConfig
    properties:
      config: |
        #!/usr/bin/env bash
        echo "The is text Юпитер" > /tmp/test

Stack creation fails with:

Resource CREATE failed: UnicodeEncodeError: resources.server_mime: 'ascii' codec can't encode characters in position 38-43: ordinal not in range(128)

The stack is created successfully if I bypass the MultipartMime and specify:

     user_data: {get_resource: test_config}

in the OS::Nova::Server resource

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

Kilo is now EOL. Since you're running standalone can you upgrade to Mitaka and retest?

Changed in heat:
status: New → Incomplete
Revision history for this message
huangtianhua (huangtianhua) wrote :

I took a test in latest version, same error raised.

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
status: Incomplete → New
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/338649

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Rico Lin (<email address hidden>) on branch: master
Review: https://review.openstack.org/338649
Reason: Hi, this patch stays untouched for few months, would like to abandon for now. Feel free to restore it if you still working on this. Thank you!

Changed in heat:
milestone: none → ocata-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/338649
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=587d12897f6a2a93d19ca101f0afaf8f15969f16
Submitter: Jenkins
Branch: master

commit 587d12897f6a2a93d19ca101f0afaf8f15969f16
Author: huangtianhua <email address hidden>
Date: Thu Jul 7 10:23:42 2016 +0800

    Use correct charset when create a text/* type MIME

    Change-Id: If0a0b8f906c9f4475156600e792021d7d9adc8f3
    Closes-Bug: #1599294

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/420268

tags: added: newton-backport-potential
tags: added: mitaka-backport-potential
removed: newton-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/mitaka)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/newton)

Reviewed: https://review.openstack.org/420268
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=ad41a03bc5a502c73dc63b6256f84a671182b24d
Submitter: Jenkins
Branch: stable/newton

commit ad41a03bc5a502c73dc63b6256f84a671182b24d
Author: huangtianhua <email address hidden>
Date: Thu Jul 7 10:23:42 2016 +0800

    Use correct charset when create a text/* type MIME

    Closes-Bug: #1599294
    (cherry picked from commit 587d12897f6a2a93d19ca101f0afaf8f15969f16)

    Conflicts:
     heat/engine/clients/os/nova.py
    Change-Id: If0a0b8f906c9f4475156600e792021d7d9adc8f3

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/mitaka)

Reviewed: https://review.openstack.org/420269
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=9bc4d0ecf65997af4f819393786b7cd95d47e552
Submitter: Jenkins
Branch: stable/mitaka

commit 9bc4d0ecf65997af4f819393786b7cd95d47e552
Author: huangtianhua <email address hidden>
Date: Thu Jul 7 10:23:42 2016 +0800

    Use correct charset when create a text/* type MIME

    Closes-Bug: #1599294
    (cherry picked from commit 587d12897f6a2a93d19ca101f0afaf8f15969f16)

    Conflicts:
     heat/engine/clients/os/nova.py
    Change-Id: If0a0b8f906c9f4475156600e792021d7d9adc8f3

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 8.0.0.0b3

This issue was fixed in the openstack/heat 8.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 7.0.2

This issue was fixed in the openstack/heat 7.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 6.1.1

This issue was fixed in the openstack/heat 6.1.1 release.

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.