Bug 1259939 - [bug] heat-stack delete needs a strong warning and confirmation prompt
[bug] heat-stack delete needs a strong warning and confirmation prompt
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-heatclient (Show other bugs)
7.0 (Kilo)
All Linux
high Severity medium
: ga
: 9.0 (Mitaka)
Assigned To: Crag Wolfe
Amit Ugol
: Reopened
: 1288473 1318716 (view as bug list)
Depends On:
Blocks: 1319027 1319028
  Show dependency treegraph
 
Reported: 2015-09-03 16:58 EDT by Jeff Pullen
Modified: 2016-08-11 08:12 EDT (History)
18 users (show)

See Also:
Fixed In Version: python-heatclient-1.0.0-1.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1319027 1319028 (view as bug list)
Environment:
Last Closed: 2016-08-11 08:12:35 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 1494058 None None None Never
OpenStack gerrit 254351 None None None 2016-01-06 16:43 EST

  None (edit)
Description Jeff Pullen 2015-09-03 16:58:44 EDT
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 12:56:12 EDT
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 17:14:59 EDT
we could do tty detection so that scripts are unaffected but interactive stack deletes get a prompt
Comment 5 Zane Bitter 2015-09-09 18:33:02 EDT
Good idea.
Comment 6 Zane Bitter 2015-12-04 08:46:06 EST
*** Bug 1288473 has been marked as a duplicate of this bug. ***
Comment 7 Crag Wolfe 2016-01-06 16:44:20 EST
Upstream patch is ready to merge, just need the +1's.
Comment 8 Steve Baker 2016-03-02 16:16:07 EST
Upstream has release python-heatclient-1.0.0, which now needs to be packaged.
Comment 9 Steve Baker 2016-03-02 17:13:47 EST
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 09:04:59 EDT
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 18:51:50 EDT
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 02:37:17 EDT
*** Bug 1318716 has been marked as a duplicate of this bug. ***
Comment 17 Jaromir Coufal 2016-03-24 17:51:56 EDT
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 15:42:41 EDT
Reopening, closed nextrelease is not valid, this should get tested and closed when we ship OSP9
Comment 21 errata-xmlrpc 2016-08-11 08:12:35 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.