Heat Update Stack Preview result in misleading result

Bug #1691786 reported by Govind Agrawal on 2017-05-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Medium
Kaz Shinohara

Bug Description

Steps to reproduce problem:
Step 1: Create stack using Template.yaml
Step 2: Update same stack which was created in step 1 using same Heat Template (Template.yaml)
Step 3: Stack update preview shows following result:

+-----------+------------------+--------------------+--------------------------------------------------------+
| state | resource_name | resource_type | resource_identity |
+-----------+------------------+--------------------+--------------------------------------------------------+
| unchanged | gpb_ext1_port | OS::Neutron::Port | { |
| | | | "stack_name": "forGovind", |
| | | | "stack_id": "6ae8c838-d943-4e7a-be83-0472d74ba2a6", |
| | | | "tenant": "68dee30f86344f14a650d0c75813801d", |
| | | | "path": "/resources/gpb_ext1_port" |
| | | | } |
| unchanged | volumegov | OS::Cinder::Volume | { |
| | | | "stack_name": "forGovind", |
| | | | "stack_id": "6ae8c838-d943-4e7a-be83-0472d74ba2a6", |
| | | | "tenant": "68dee30f86344f14a650d0c75813801d", |
| | | | "path": "/resources/volumegov" |
| | | | } |
| updated | instancegovmain- | OS::Nova::Server | { |
| | | | "stack_name": "forGovind", |
| | | | "stack_id": "6ae8c838-d943-4e7a-be83-0472d74ba2a6", |
| | | | "tenant": "68dee30f86344f14a650d0c75813801d", |
| | | | "path": "/resources/instancegovmain-" |
| | | | } |
+-----------+------------------+--------------------+--------------------------------------------------------+

I am wondering if i use the same template then why it is showing os::nova::server resource as updated ?

Please revert.

========================
Heat Template Content
File name : Template.yaml
========================

heat_template_version: 2013-05-23

resources:
  volumegov:
    properties:
      size: 1
    type: "OS::Cinder::Volume"

  gpb_ext1_port:
    type: OS::Neutron::Port
    properties:
      network: 551be7be-0386-447b-ba3b-91388a100c02

  instancegovmain-:
    properties:
      flavor: 205bb2df-d4fa-4478-bf97-cb2e69d440b5
      image: 26b9f717-137e-41e0-adbe-78346f72ba63
      networks:
        - port: { get_resource: gpb_ext1_port }
    type: "OS::Nova::Server"

Which heat version are you using btw?

I can also reproduce this issue.

Changed in heat:
status: New → Confirmed

I think it caused by the port which changes from None ==> <Port>

May 19 13:35:23 ubuntu heat-engine[23204]: ResourceDefinition(u'instancegovmain-', u'OS::Nova::Server', properties={u'flavor': u'm1.tiny', u'image': u'cirros-0.3.5-x86_64-disk', u'networks': [{u'port': None}]}, metadata=None, depends=None, deletion_policy=None, update_policy=None, condition=None)

May 19 13:35:23 ubuntu heat-engine[23204]: ResourceDefinition(u'instancegovmain-', u'OS::Nova::Server', properties={u'flavor': u'm1.tiny', u'image': u'cirros-0.3.5-x86_64-disk', u'networks': [{u'port': u'6a6f820d-257a-48e6-bc91-86bda848aceb'}]}, metadata=None, depends=None, deletion_policy=None, update_policy=None, condition=None)

Notice the port got some id. Hence showing as updated.

Rabi Mishra (rabi) wrote :

Yeah, looks like it's broken. Feel free to propose a patch.

Changed in heat:
importance: Undecided → Medium
Govind Agrawal (govind12) wrote :

There is a one more scenario where i saw this problem.

Step 1) create Heat Stack using server resource where property flavor is mentioned as flavor name instead of flavor UUID.

Step 2) Update heat stack preview with the same template what you used in step 1 , output says "os::nova::server" resource is updated.

Solution: use flavor UUID instead of flavor name.

Kaz Shinohara (kazsh) wrote :

Looks nobody is working for this, I will propose the patch. Thanks.

Changed in heat:
assignee: nobody → Kazunori Shinohara (ksnhr)
Govind Agrawal (govind12) wrote :

Hi Kazunori,

could you please look into below bug as well as it is also related to Update Heat Stack preview :
https://bugs.launchpad.net/heat/+bug/1689355

while we are adding new os::nova::server resources and perform the "UPDATE HEAT STACK PREVIEW", the output in update preview for added resources is not identical what we get using "HEAT STACK CREATE PREVIEW".

For e.g. flavor and os-extended-volumes:volumes_attached not appear in HEAT STACK UPDATE PREVIEW

Kaz Shinohara (kazsh) wrote :

ok, will check that also.

Fix proposed to branch: master
Review: https://review.openstack.org/493852

Changed in heat:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers