Bug 1299257 - heat API: actions->check removes stack output values.
heat API: actions->check removes stack output values.
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat (Show other bugs)
7.0 (Kilo)
Unspecified Linux
urgent Severity urgent
: z4
: 7.0 (Kilo)
Assigned To: Thomas Hervé
Amit Ugol
: ZStream
Depends On:
Blocks: 1299912
  Show dependency treegraph
 
Reported: 2016-01-17 17:37 EST by Matt Flusche
Modified: 2018-02-08 06:10 EST (History)
10 users (show)

See Also:
Fixed In Version: openstack-heat-2015.1.2-8.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, using the heat API actions > check call removed the output values from existing heat stack. This behaviour was observed with the CLI (heat action-check <heat-stack>) and dashboard (heat "Check Stack" button). This broke stack updates and other operations depending on stack output values after this operation was executed. This patch gets attribute instead of return None if resource is in SNAPSHOT or CHECK action which resolves the issue.
Story Points: ---
Clone Of:
: 1299912 (view as bug list)
Environment:
Last Closed: 2016-02-18 11:43:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 268957 None None None 2016-01-18 10:20 EST
Red Hat Product Errata RHSA-2016:0266 normal SHIPPED_LIVE Moderate: openstack-heat bug fix and security advisory 2016-02-18 16:41:02 EST

  None (edit)
Description Matt Flusche 2016-01-17 17:37:22 EST
Description of problem:
Using the heat API actions->check call will remove output values from existing heat stack.

Behavior observed with the CLI and Dashboard.

heat "Check Stack" button (Horizon)
&
"heat action-check <heat-stack>"

This will break stack updates and other operations depending on stack output values after this operation is executed.

Version-Release number of selected component (if applicable):
openstack-heat-engine-2015.1.2-4.el7ost.noarch
openstack-heat-common-2015.1.2-4.el7ost.noarch
openstack-heat-api-2015.1.2-4.el7ost.noarch


How reproducible:
100%

Steps to Reproduce:
1.  create a simple test heat stack that contains outputs

heat stack-create test -f test.yaml -e env.yaml
test.yaml[1]
env.yaml[2]

2. Verify stack create was successful and the output values.

$ heat stack-list
+--------------------------------------+------------+-----------------+----------------------+
| id                                   | stack_name | stack_status    | creation_time        |
+--------------------------------------+------------+-----------------+----------------------+
| 03bb28f6-5127-42b2-936d-a354416f7d99 | test       | CREATE_COMPLETE | 2016-01-17T22:25:13Z |
+--------------------------------------+------------+-----------------+----------------------+

$ heat output-list test
+------------+----------------------+
| output_key | description          |
+------------+----------------------+
| image_A    | No description given |
| ip_A       | IP address A server  |
+------------+----------------------+

$ heat output-show test ip_A
"172.16.40.9"

3. Run action-check on test stack and it completes successfully

$ heat action-check test
+--------------------------------------+------------+-------------------+----------------------+
| id                                   | stack_name | stack_status      | creation_time        |
+--------------------------------------+------------+-------------------+----------------------+
| 03bb28f6-5127-42b2-936d-a354416f7d99 | test       | CHECK_IN_PROGRESS | 2016-01-17T22:25:13Z |
+--------------------------------------+------------+-------------------+----------------------+

$ heat stack-list
+--------------------------------------+------------+----------------+----------------------+
| id                                   | stack_name | stack_status   | creation_time        |
+--------------------------------------+------------+----------------+----------------------+
| 03bb28f6-5127-42b2-936d-a354416f7d99 | test       | CHECK_COMPLETE | 2016-01-17T22:25:13Z |
+--------------------------------------+------------+----------------+----------------------+

4. Run heat output-show is now null

$ heat output-show test ip_A
null


Actual results:
heat stack output values become null 


Expected results:
The same output values should be returned after the action-check

Additional info:


[1] test.yaml
heat_template_version: 2013-05-23

description:

parameters:
  public_net_id:
    type: string
    description: ID of public network
    constraints:
      - custom_constraint: neutron.network
        description: Must be a valid network ID
  flavor:
    type: string
    description: Flavor to use
    constraints:
      - custom_constraint: nova.flavor
        description: Must be a valid flavor name
  image:
    type: string
    description: Name of image to use
    constraints:
      - custom_constraint: glance.image
        description: Must be a valid image name

resources:
  server:
    type: OS::Nova::Server
    properties:
      networks:
      - port:
          get_resource: server_port
      name: server_A
      image: { get_param: image }
      flavor: { get_param: flavor }
                  
  server_port:  
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: public_net_id }

outputs:
  ip_A:
    description: IP address A server
    value: { get_attr: [ server, first_address ] }
  image_A:
    value: { get_param: image }


[2] env.yaml
parameters:
  flavor: m1.demo
  image: cirros
  public_net_id: b54b1eb9-8076-4b3a-92d3-1d5725b03fad
Comment 2 Thomas Hervé 2016-01-18 04:50:50 EST
I think I identified the bug as https://bugs.launchpad.net/heat/+bug/1505054

I started the backporting process here: https://review.openstack.org/#/c/268957/
Comment 9 Amit Ugol 2016-02-16 07:12:50 EST
using the steps from the original message, this seems to be working well now.
Comment 11 errata-xmlrpc 2016-02-18 11:43:01 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-0266.html

Note You need to log in before you can comment on or make changes to this bug.