Can't get output of SoftwareDeployment resource when using HEAT_SIGNAL

Bug #1355692 reported by Yanyan Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Heat Templates
Fix Committed
Undecided
Yanyan Hu

Bug Description

When using HEAT_SIGNAL option, the output of SoftwareDeployment resource can't be returned correctly. All output attributes such as 'deploy_stdout, deploy_stderr, deploy_status_code' will be null.

In 55-heat-confg.py, the output of hooks(signal_data) will be dumped to JSON object before passed to heat client. However, heat client will dump it again before invoking _http_request.

For example, if the original output is:
{'deploy_status_code': 0, 'stderr': 'test-stderr', 'stdout': 'test-stdout'}

The first JSON dump result will be:
{"deploy_status_code": 0, "stderr": "test-stderr", "stdout": "test-stdout"}

The second JSON dump result will be:
"{\"deploy_status_code\": 0, \"stderr\": \"test-stderr\", \"stdout\": \"test-stdout\"}"

This is not a valid input for requests.request() for 'data' parameter. Therefore, the 'body' will be empty when heat-api accept the request and all output of SoftwareDeployment resource will be lost.

Yanyan Hu (yanyanhu)
Changed in heat-templates:
assignee: nobody → Yanyan Hu (yanyanhu)
status: New → In Progress
Revision history for this message
Yanyan Hu (yanyanhu) wrote :

An in-progress fix is here:
https://review.openstack.org/113473/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat-templates (master)

Reviewed: https://review.openstack.org/113473
Committed: https://git.openstack.org/cgit/openstack/heat-templates/commit/?id=3ddf10225547e628e2d9f144396386892dfbc8e4
Submitter: Jenkins
Branch: master

commit 3ddf10225547e628e2d9f144396386892dfbc8e4
Author: Yanyan Hu <email address hidden>
Date: Tue Aug 12 04:44:48 2014 -0500

    Pass signal_data to heat client as dict rather than JSON

    This patch removes JSON dump operations of signal_data in
    heat-config and passes signal_data to heat client as dict.
    This will fix the request body lost issue which causes
    output of SoftwareDeployment resources unavailable when
    using HEAT_SIGNAL.

    Change-Id: I24848a875405a8b89cd629a064f774b7a80d25b8
    Closes-Bug: #1355692

Changed in heat-templates:
status: In Progress → Fix Committed
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.