preview_update_stack doesn't return details for nested stacks

Bug #1521971 reported by Steven Hardy on 2015-12-02
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steven Hardy
python-heatclient
Fix Released
High
Steven Hardy

Bug Description

Currently stack-update --dry-run has no way to return details of what is updated/replaced in nested stacks, e.g

$ heat stack-update -e registry-nooped.yaml --dry-run --template-file test.yaml test
+---------+---------------+---------------+--------------------------------------------------------+
| state | resource_name | resource_type | resource_identity |
+---------+---------------+---------------+--------------------------------------------------------+
| updated | network | MY::Net | { |
| | | | "stack_name": "test", |
| | | | "stack_id": "ddcdb4c5-be04-41b9-8932-9cd4ab9d7f9e", |
| | | | "tenant": "25aa36db551542a7953879d1d0cdeebb", |
| | | | "path": "/resources/network" |
| | | | } |
| updated | port | MY::Port | { |
| | | | "stack_name": "test", |
| | | | "stack_id": "ddcdb4c5-be04-41b9-8932-9cd4ab9d7f9e", |
| | | | "tenant": "25aa36db551542a7953879d1d0cdeebb", |
| | | | "path": "/resources/port" |
| | | | } |
+---------+---------------+---------------+--------------------------------------------------------+

Here we have a dry-run update of two provider resources, and all we see is "updated", which is really not all that useful, when we need to know if any resources are replaced inside those nested stacks

Steven Hardy (shardy) wrote :

Note the example above is derived from the reproducer attached to https://bugs.launchpad.net/heat/+bug/1521944

Steven Hardy (shardy) on 2015-12-02
Changed in heat:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Steven Hardy (shardy)
milestone: none → mitaka-2
Changed in heat:
milestone: mitaka-2 → mitaka-3

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

Changed in heat:
status: Triaged → In Progress
Steven Hardy (shardy) on 2016-01-18
Changed in python-heatclient:
assignee: nobody → Steven Hardy (shardy)
status: New → In Progress
importance: Undecided → High

Reviewed: https://review.openstack.org/268995
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=0a4249f5d1faa26b91ab5cfff5a6f5762fe7854d
Submitter: Jenkins
Branch: master

commit 0a4249f5d1faa26b91ab5cfff5a6f5762fe7854d
Author: Steven Hardy <email address hidden>
Date: Mon Jan 18 10:56:13 2016 +0000

    Fix update preview to consider type comparison

    Currently the update preview code only considers _needs_update, but
    the actual update code does a type comparison which is used to decide
    whether to attempt an in-place update vs a replacement.

    Thus, we currently erroneously say a resource is either unchanged or
    updated during update --dry-run when the type changes, but during
    the actual update we replace the resource. So instead use the same
    type comparison used during update to provide a more accurate preview.

    Change-Id: Idb2d9a55d47748007a438f84bb1f2259e553c067
    Partial-Bug: #1521971

Reviewed: https://review.openstack.org/269176
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=c7b606a060d2ad0631ffb3eef0f5c456b682e388
Submitter: Jenkins
Branch: master

commit c7b606a060d2ad0631ffb3eef0f5c456b682e388
Author: Steven Hardy <email address hidden>
Date: Tue Dec 15 20:58:07 2015 +0000

    Add show_nested support to update --dry-run

    Currently update preview provides no way to show the updates
    for nested stack resources, so this adds a flag --show-nested,
    which is similar to other interfaces e.g template-validate.

    Closes-Bug: #1521971
    Change-Id: I06f3b52d5d48dd5e6e266321e58ca8e6116d6017

Changed in python-heatclient:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/268997
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4cfd9a10ac585f3b675185acde8ab762e65ec55b
Submitter: Jenkins
Branch: master

commit 4cfd9a10ac585f3b675185acde8ab762e65ec55b
Author: Steven Hardy <email address hidden>
Date: Mon Dec 7 15:59:09 2015 +0000

    Fix update preview to handle nested stacks

    Currently the update preview code has no support for previewing
    the effect of an update on nested stacks, which I assume was an
    oversight in the original implementation. So this adds a show_nested
    flag to the API which allows enabling recursive preview of the whole
    update including nested stacks.

    Closes-Bug: #1521971
    Depends-On: I06f3b52d5d48dd5e6e266321e58ca8e6116d6017
    Change-Id: I96af4d2f07056846aac7ae9ad9b6eb160e8bd51a

Changed in heat:
status: In Progress → Fix Released

This issue was fixed in the openstack/python-heatclient 1.0.0 release.

This issue was fixed in the openstack/heat 6.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers