Bug 1281557 - rhel-osp-director: 8.0 - first attempt to run "heat stack-delete overcloud" shows in the status column the last available status.
rhel-osp-director: 8.0 - first attempt to run "heat stack-delete overcloud" s...
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-heatclient (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
unspecified Severity unspecified
: ga
: 9.0 (Mitaka)
Assigned To: Steve Baker
Alexander Chuzhoy
: Reopened, UserExperience
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-12 14:06 EST by Alexander Chuzhoy
Modified: 2016-08-15 01:21 EDT (History)
14 users (show)

See Also:
Fixed In Version: python-heatclient-1.2.0-1.el7ost
Doc Type: Bug Fix
Doc Text:
The 'stack-delete' command displayed information about the heat stack immediately after requesting the delete. Deleting a heat stack is an asynchronous operation so the display status may not have yet changed to 'DELETE_IN_PROGRESS', and users may find this confusing. The 'stack-delete' command now returns nothing, which is consistent with other OpenStack services delete commands.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-11 08:13:18 EDT
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
Launchpad 1556407 None None None 2016-06-28 05:13 EDT

  None (edit)
Description Alexander Chuzhoy 2015-11-12 14:06:12 EST
rhel-osp-director: 8.0 - first attempt to run "heat stack-delete <name>" shows in the status column the last available status.


Environment:
openstack-heat-api-cloudwatch-5.0.0-1.el7ost.noarch
openstack-heat-templates-0-0.1.20151019.el7ost.noarch
openstack-heat-engine-5.0.0-1.el7ost.noarch
python-heatclient-0.8.0-1.el7ost.noarch
openstack-heat-api-5.0.0-1.el7ost.noarch
openstack-tripleo-heat-templates-0.8.7-1.el7ost.noarch
openstack-heat-api-cfn-5.0.0-1.el7ost.noarch
heat-cfntools-1.2.8-2.el7.noarch
openstack-heat-common-5.0.0-1.el7ost.noarch


Steps to reproduce:
Attempt to deploy an overcloud.
Attempt to delete the deployed overcloud with heat stack-delete overcloud

Result:

 heat stack-delete overcloud
+--------------------------------------+------------+---------------+---------------------+--------------+
| id                                   | stack_name | stack_status  | creation_time       | updated_time |
+--------------------------------------+------------+---------------+---------------------+--------------+
| e4cc93d1-fa55-461d-818a-e53dc728edd8 | overcloud  | CREATE_FAILED | 2015-11-12T17:34:42 | None         |
+--------------------------------------+------------+---------------+---------------------+--------------+


CREATE_FAILED was the status from the previous deployment.
Running the deletion command again:
[stack@instack ~]$ heat stack-delete overcloud
+--------------------------------------+------------+--------------------+---------------------+--------------+
| id                                   | stack_name | stack_status       | creation_time       | updated_time |
+--------------------------------------+------------+--------------------+---------------------+--------------+
| e4cc93d1-fa55-461d-818a-e53dc728edd8 | overcloud  | DELETE_IN_PROGRESS | 2015-11-12T17:34:42 | None         |
+--------------------------------------+------------+--------------------+---------------------+--------------+


Looks OK.



Expected result:
The DELETE_IN_PROGRESS should appear on first attempt to delete the overcloud.
Comment 2 Zane Bitter 2015-11-12 14:11:41 EST
Because Heat starts stack operations in a separate thread, it can return a result to the client before the stack moves to the IN_PROGRESS state. When the client immediately queries the stack status it may see either the previous or the new status. It would be nice if this couldn't happen, but it is very difficult to fix cleanly and there are no plans to do so at the moment.
Comment 4 Rabi Mishra 2016-03-31 01:25:31 EDT
I think the current behaviour is changed upstream not to do a stack-list with stack-delete.

upstream bug: https://bugs.launchpad.net/python-heatclient/+bug/1556407
gerrit review: https://review.openstack.org/#/c/292697/
Comment 5 Steve Baker 2016-04-06 17:20:03 EDT
This will be fixed in rhos-9.0 but please note that rhos-8.0 has a new "openstack stack delete" command which doesn't have this issue.
Comment 6 Steve Baker 2016-06-01 18:17:24 EDT
This has been fixed in upstream python-heatclient-1.2.0, which is not yet in RHOS-9.

I suggest we rebase RHOS-9 to use python-heatclient-1.2.0
Comment 8 Alexander Chuzhoy 2016-06-28 17:30:07 EDT
Verified:

Environment:
python-heatclient-1.2.0-1.el7ost.noarch

Tried with both:   heat stack-delete and openstack stack delete
Both worked as expected.

[stack@instack ~]$ heat stack-delete overcloud --yes
WARNING (shell) "heat stack-delete" is deprecated, please use "openstack stack delete" instead
Request to delete stack overcloud has been accepted.
[stack@instack ~]$ heat stack-list
WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead
+--------------------------------------+------------+--------------------+---------------------+---------------------+
| id                                   | stack_name | stack_status       | creation_time       | updated_time        |
+--------------------------------------+------------+--------------------+---------------------+---------------------+
| 828e7f53-40db-4803-a3e2-9af7936d1e11 | overcloud  | DELETE_IN_PROGRESS | 2016-06-28T16:30:27 | 2016-06-28T17:33:09 |
+--------------------------------------+------------+--------------------+---------------------+---------------------+
[stack@instack ~]$





 heat stack-list
WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead
+--------------------------------------+------------+---------------+---------------------+---------------------+
| id                                   | stack_name | stack_status  | creation_time       | updated_time        |
+--------------------------------------+------------+---------------+---------------------+---------------------+
| 1ca43517-f827-4509-be1f-ce5c412f276a | overcloud  | UPDATE_FAILED | 2016-06-27T15:40:57 | 2016-06-28T15:53:48 |
+--------------------------------------+------------+---------------+---------------------+---------------------+

[stack@instack ~]$
[stack@instack ~]$ openstack stack delete overcloud --yes
[stack@instack ~]$ heat stack-list
WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead
+--------------------------------------+------------+--------------------+---------------------+---------------------+
| id                                   | stack_name | stack_status       | creation_time       | updated_time        |
+--------------------------------------+------------+--------------------+---------------------+---------------------+
| 1ca43517-f827-4509-be1f-ce5c412f276a | overcloud  | DELETE_IN_PROGRESS | 2016-06-27T15:40:57 | 2016-06-28T15:53:48 |
+--------------------------------------+------------+--------------------+---------------------+---------------------+
Comment 10 errata-xmlrpc 2016-08-11 08:13:18 EDT
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/RHEA-2016-1597.html

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