Bug 1564874 - validate existing stacks on 'openstack stack delete'
Summary: validate existing stacks on 'openstack stack delete'
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Zane Bitter
QA Contact: Ronnie Rasouli
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-08 12:53 UTC by Ronnie Rasouli
Modified: 2018-04-11 00:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-04-11 00:07:28 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Ronnie Rasouli 2018-04-08 12:53:17 UTC
Description of problem:

We do not validate on openstack stack delete command an existing stacks, in case the stack does not exist then the command fails. 

openstack stack delete foo
Are you sure you want to delete this stack(s) [y/N]? y
Stack not found: foo
Unable to delete 1 of the 1 stacks.

Version-Release number of selected component (if applicable):
all versions

How reproducible:

Steps to Reproduce:
1. delete a non existing stack
2. approve the dialog Y

Actual results:
The validation appears after the command

Expected results:

Validate the stack existance prior the approval dialog. (Are you sure you want to delete this stack(s) [y/N]? y)

Additional info:

Comment 3 Rabi Mishra 2018-04-10 14:51:07 UTC
IMO it's expected to work that way and is not a bug as we don't check for the existence of the stack before making a REST call for delete. If the expectation is that yes/no prompt should not appear if the stack does not exist, then we have to make another REST call before the DELETE which I don't think is justified.

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