Bug 1259939 - [bug] heat-stack delete needs a strong warning and confirmation prompt
Summary: [bug] heat-stack delete needs a strong warning and confirmation prompt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-heatclient
Version: 7.0 (Kilo)
Hardware: All
OS: Linux
high
medium
Target Milestone: ga
: 9.0 (Mitaka)
Assignee: Crag Wolfe
QA Contact: Amit Ugol
URL:
Whiteboard:
: 1288473 1318716 (view as bug list)
Depends On:
Blocks: 1319027 1319028
TreeView+ depends on / blocked
 
Reported: 2015-09-03 20:58 UTC by Jeff Pullen
Modified: 2019-10-10 10:09 UTC (History)
18 users (show)

Fixed In Version: python-heatclient-1.0.0-1.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1319027 1319028 (view as bug list)
Environment:
Last Closed: 2016-08-11 12:12:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1494058 0 None None None Never
OpenStack gerrit 254351 0 None None None 2016-01-06 21:43:06 UTC
Red Hat Product Errata RHEA-2016:1597 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 9 Release Candidate Advisory 2016-08-11 16:06:52 UTC

Description Jeff Pullen 2015-09-03 20:58:44 UTC
Description of problem:
A single copy paste error could result in destroying the entire overcloud. There needs to be some warning to ensure that the command wasn't entered in error, and that the user is aware of the consequences.


Version-Release number of selected component (if applicable):
OSP 7

How reproducible:
[stack@undercloud ~]$ heat stack-list
+--------------------------------------+------------+-----------------+----------------------+
| id                                   | stack_name | stack_status    | creation_time        |
+--------------------------------------+------------+-----------------+----------------------+
| 0cbb64e3-9f6c-4f89-b19b-f6b169f886ba | overcloud  | UPDATE_COMPLETE | 2015-09-03T14:39:33Z |
+--------------------------------------+------------+-----------------+----------------------+
[stack@undercloud ~]$ 
[stack@undercloud ~]$ heat stack-delete overcloud
+--------------------------------------+------------+--------------------+----------------------+
| id                                   | stack_name | stack_status       | creation_time        |
+--------------------------------------+------------+--------------------+----------------------+
| 0cbb64e3-9f6c-4f89-b19b-f6b169f886ba | overcloud  | DELETE_IN_PROGRESS | 2015-09-03T14:39:33Z |
+--------------------------------------+------------+--------------------+----------------------+
[stack@undercloud ~]$ 
[stack@undercloud ~]$ heat stack-list
+----+------------+--------------+---------------+
| id | stack_name | stack_status | creation_time |
+----+------------+--------------+---------------+
+----+------------+--------------+---------------+


Steps to Reproduce:
1. Access director server as stack user and source the stackrc file
2. type 'heat stack-delete <STACK NAME>'

Actual results:
No warning or prompt given prior to stack deletion

Expected results:
User should be given a prompt with a warning that the action will immediately and irreversibly delete all the nodes associated with the stack and require they type Y or N. 

Additional info:

Comment 3 Zane Bitter 2015-09-04 16:56:12 UTC
This probably would have been a good idea to have baked in from the start. However, there's no way to add it now without breaking any and all existing scripts that include a stack delete.

Comment 4 Steve Baker 2015-09-06 21:14:59 UTC
we could do tty detection so that scripts are unaffected but interactive stack deletes get a prompt

Comment 5 Zane Bitter 2015-09-09 22:33:02 UTC
Good idea.

Comment 6 Zane Bitter 2015-12-04 13:46:06 UTC
*** Bug 1288473 has been marked as a duplicate of this bug. ***

Comment 7 Crag Wolfe 2016-01-06 21:44:20 UTC
Upstream patch is ready to merge, just need the +1's.

Comment 8 Steve Baker 2016-03-02 21:16:07 UTC
Upstream has release python-heatclient-1.0.0, which now needs to be packaged.

Comment 9 Steve Baker 2016-03-02 22:13:47 UTC
Lon, python-heatclient-1.0.0 has just been released upstream. Other than being the first stable release of heatclient, it also has added a full suite of heat commands for the python-openstackclient cli.

For packaging this means that python-heatclient needs to depend on python-openstackclient.

My question is would it be worth packaging python-heatclient-1.0.0 into RHOS 8.0? The benefits to our customers would be access to the new openstack commands, and the UX effort we put into them.

Comment 11 Jaromir Coufal 2016-03-17 13:04:59 UTC
Crag, Steve,

was the patch merged, is it part of python-heatclient-1.0.0, is it part of OSP8?

Thanks
-- Jarda

Comment 15 Steve Baker 2016-03-20 22:51:50 UTC
Yes, this change is in heatclient-1.0.0 and won't be in OSP8 unless it is backported.

Comment 16 Anand Nande 2016-03-21 06:37:17 UTC
*** Bug 1318716 has been marked as a duplicate of this bug. ***

Comment 17 Jaromir Coufal 2016-03-24 21:51:56 UTC
This should be part of Mitaka code already. Closing this for OSP9, earlier versions are handled with separate bugs.

Comment 18 Mike Burns 2016-04-21 19:42:41 UTC
Reopening, closed nextrelease is not valid, this should get tested and closed when we ship OSP9

Comment 21 errata-xmlrpc 2016-08-11 12:12:35 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/RHEA-2016-1597.html


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