Bug 1299257 - heat API: actions->check removes stack output values.
Summary: heat API: actions->check removes stack output values.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Linux
urgent
urgent
Target Milestone: z4
: 7.0 (Kilo)
Assignee: Thomas Hervé
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks: 1299912
TreeView+ depends on / blocked
 
Reported: 2016-01-17 22:37 UTC by Matt Flusche
Modified: 2022-07-09 08:13 UTC (History)
10 users (show)

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.
Clone Of:
: 1299912 (view as bug list)
Environment:
Last Closed: 2016-02-18 16:43:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 268957 0 None MERGED Do not return None when get_attr if res is in SNAPSHOT/CHECK 2020-04-01 17:04:12 UTC
Red Hat Issue Tracker OSP-16731 0 None None None 2022-07-09 08:13:28 UTC
Red Hat Product Errata RHSA-2016:0266 0 normal SHIPPED_LIVE Moderate: openstack-heat bug fix and security advisory 2016-02-18 21:41:02 UTC

Description Matt Flusche 2016-01-17 22:37:22 UTC
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 09:50:50 UTC
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 12:12:50 UTC
using the steps from the original message, this seems to be working well now.

Comment 11 errata-xmlrpc 2016-02-18 16:43:01 UTC
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.