Format string interpolation issue with OS::Heat::MultipartMime

Bug #1496018 reported by Johannes Grassler
This bug report is a duplicate of:  Bug #1473660: multipart mime wait handle. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Incomplete
Undecided
Unassigned
Kilo
Incomplete
Undecided
Unassigned

Bug Description

Summary
=======

There appears to be a format string interpolation issue with OS::Heat::MultipartMime
that is triggered when the string '%s' occurs twice or more in a MultipartMime
resource part's config: payload. If this is the case, the stack ends up in
state CREATE_FAILED with the following error message:

  TypeError: not enough arguments for format string

[There is a full stack trace in stacktrace.txt included in multipart.tar.]

Environment
===========

Openstack Kilo with the following Heat packages:

# dpkg -l | grep heat | awk '{print $2 " " $3}'
heat-api 2015.1.1-0ubuntu1~cloud1+syseleven1
heat-api-cfn 2015.1.1-0ubuntu1~cloud1+syseleven1
heat-common 2015.1.1-0ubuntu1~cloud1+syseleven1
heat-engine 2015.1.1-0ubuntu1~cloud1+syseleven1
python-heat 2015.1.1-0ubuntu1~cloud1+syseleven1
python-heatclient 0.3.0-0ubuntu1~cloud0

+syseleven1 contains fixes for the following bugs:

  * https://bugs.launchpad.net/heat/+bug/1451819
  * https://bugs.launchpad.net/heat/+bug/1488475

This is the only difference from 2015.1.1-0ubuntu1~cloud1.

Steps to reproduce
==================

1. Download and extract multipart.tar:

    % tar -xf multipart.tar
    % cd multipart/

2. Instantiate the broken heat template (contains 2 occurences of '%s'):

    % heat stack-create -f broken.yaml multipart_broken
    +--------------------------------------+-------------------+--------------------+----------------------+
    | id | stack_name | stack_status | creation_time |
    +--------------------------------------+-------------------+--------------------+----------------------+
    | 859bcd56-6567-48a4-9eb6-91c6e53a004f | multipart_broken | CREATE_IN_PROGRESS | 2015-09-15T14:55:08Z |
    +--------------------------------------+-------------------+--------------------+----------------------+
    % heat stack-list | grep multipart
    | 859bcd56-6567-48a4-9eb6-91c6e53a004f | multipart_broken | CREATE_FAILED | 2015-09-15T14:55:08Z |

    stacktrace.txt containts a full stack trace.

3. Instantiate the working heat template (only contains 1 occurence of '%s'):

    % heat stack-create -f working.yaml multipart_working
    +--------------------------------------+-------------------+--------------------+----------------------+
    | id | stack_name | stack_status | creation_time |
    +--------------------------------------+-------------------+--------------------+----------------------+
    | 859bcd56-6567-48a4-9eb6-91c6e53a004f | multipart_broken | CREATE_FAILED | 2015-09-15T14:55:08Z |
    | ed5cbce0-f913-4a0d-a8c6-c266413d532d | multipart_working | CREATE_IN_PROGRESS | 2015-09-15T14:56:19Z |
    +--------------------------------------+-------------------+--------------------+----------------------+
    % heat stack-list | grep multipart
    | 859bcd56-6567-48a4-9eb6-91c6e53a004f | multipart_broken | CREATE_FAILED | 2015-09-15T14:55:08Z |
    | ed5cbce0-f913-4a0d-a8c6-c266413d532d | multipart_working | CREATE_COMPLETE | 2015-09-15T14:56:19Z |
    %

Revision history for this message
Johannes Grassler (jgr-launchpad) wrote :
Revision history for this message
Rabi Mishra (rabi) wrote :

Looks like this has been already fixed. Can you try this patch?

https://review.openstack.org/#/c/203508/

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

Marking as Incomplete since this might be fixed already in Kilo and are awaiting confirmation

Changed in heat:
status: New → Incomplete
Revision history for this message
Johannes Grassler (jgr-launchpad) wrote :
Revision history for this message
Steven Hardy (shardy) wrote :

Closing as a duplicate of bug #1473660 per comment #4

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.